Questions tagged [paging]

Questions about memory-management techniques where the computer manages and transfers data between main memory and secondary storage in pages -- discrete chunks of a fixed size. Operating systems often use paging to implement virtual memory.

Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

Do all processes are allocated equal sized page map tables?

I have a simple question : In a paged memory system, all processes are allocated equal sized page map tables ?
1
vote
1answer
48 views

Paging only for user code. What about kernel code?

Why is paging done only for user code (user space)? I know that the basic intuition behind paging is for managing larger logical address space in smaller physical main memory space. Won't the kernel ...
0
votes
0answers
19 views

Multi-level paging where the inner level page tables are split into pages with entries occupying half the page size

A processor uses $36$ bit physical address and $32$ bit virtual addresses, with a page frame size of $4$ Kbytes. Each page table entry is of size $4$ bytes. A three level page table is used for ...
0
votes
0answers
22 views

page table size in a 1 and 2 levels page table

Consider that virtual page numbers are 36 bits, and page table entries, as well as pointers to other page tables are 4 bytes each. First , if we need to calculate how much memory would a single level ...
0
votes
0answers
16 views

Calculate physical address given a reference number and 2-level page table

How can I calculate a physical address from a reference number and a 2-level page table? A system with a 2-level page table, and the contents of page table No. 1 of level 2 (p1, p2, offset) are: {(32, ...
0
votes
0answers
34 views

Hierarchical page tables with page size of 8 KB

Consider a machine with a physical memory of 8 GB, a page size of 8 KB, and a page table entry size of 4 bytes. How many levels of page tables would be required to map a 46-bit virtual address space ...
0
votes
1answer
65 views

When is it best to use the second chance replacement algorithm?

I'm going through 'Operating Concepts' by Silberschatz, Galvin and Gagne (The Dinosaur Book) and it mentions the Second-Chance Algorithm (not enhanced) as an improvement on the FIFO replacement ...
1
vote
1answer
44 views

Is physical pages zeroed out before it's mapped to a virtual page?

I don't how this works. According to me if the physical memory is not cleared then there is some security risk as there may be some sensitive information in it from the other processes. How does the ...
0
votes
0answers
12 views

working set bits in working set approximation

I am looking at the example pdf from Cornell found here: https://www.cs.cornell.edu/courses/cs4410/2016su/slides/lecture13.pdf Also reading OS Concepts 10e Chapter 10 but it does not go into detail. ...
5
votes
1answer
520 views

How does a TLB lookup compare all keys simultaneously?

I am reading OS Concepts dinosaur book which says, "Each entry in the TLB consists of two parts: a key (or tag) and a value. When the associative memory is presented with an item, the item is compared ...
1
vote
1answer
31 views

Paging - access less than a page of memory

I'm having a bit of trouble understanding how less than a page of memory can be used. From what I understand, memory is given out in page size chunks - say pages are 4096 bytes, and 4 bytes are ...
0
votes
0answers
33 views

How many page-table entries are needed in case the program uses the whole logical address space

Say I have: page size = 2^12 bytes physical memory = 2^24 bytes logical address space = 2^32 How many page-table entries are needed in case the program uses the whole logical address space?
0
votes
1answer
169 views

Converting physical address to logical

In 8-bit address space there are 16 pages and the page table stores: 68792EA51BD3CF04 (hex) The physical address is 39h, what is the corresponding logical address? I have literally no idea what to ...
1
vote
1answer
60 views

How are logical addresses of instruction operands mapped to physical addresses?

Is address translation for all operands in single instruction done only once and then are all operands fetched continuously? For example, consider any dummy instruction ...
0
votes
2answers
536 views

Why does paging not have external fragmentation?

I have read that paging does not suffer from external fragmentation as the frames and the pages are all of the equal sizes, but when we store a last level page table in a frame at that time it may not ...
0
votes
1answer
310 views

Understanding paging and internal fragmentation

I am currently studing questions but stuck on this one, I hope someone can help me out to understand. Question: Assume that we have a paged virtual memory with a page size of 4Ki byte. Assume that ...
1
vote
1answer
376 views

Difference between present - absent bit and valid - invalid bit in a page table?

while reading I found this: Present/Absent bit – Present or absent bit says whether a particular page you are looking for is present or absent. In case if it is not present, that is called Page ...
2
votes
1answer
251 views

What does it mean " The outer level page table need not be page aligned?

The question is in context to multilevel page table. I was trying to solve numerical on multi-level paging and noticed that page size might not be same at all levels. I came across the point "Outer ...
0
votes
1answer
369 views

Multi-level Paging

Consider a system which has 2 level paging.The page table is divided into 2K pages and each page is having 4K entries.Memory is word addressable and Physical address space is 64MW which is divided ...
2
votes
1answer
823 views

How does hashed inverted page table work?

I understand hash function and inverted page table, but then the book I read describes something called hashed inverted page table (use hash to accelerate the finding because IPT is large), with TLB ...
1
vote
0answers
313 views

pool of free page frames OS

I read that in a paging scheme memory management, some os's have a paging daemon that wakes up periodically to inspect the memory of the RAM. This is to ensure that modified pages can be scheduled to ...
0
votes
1answer
148 views

Page Replacement optimal verses MRU

A computer has twenty physical page frames which contain pages numbered 101 through 120. Now a program accesses the pages numbered 1, 2, …, 100 in that order, and repeats the access sequence THRICE. ...
1
vote
1answer
3k views

How to find the virtual pages and physical memory frames?

So i am given a system of 20 bits virtual addresses and 18 bits physical addresses using paging with pages size 4Kbytes. I am told to find the maximum number of virtual pages that a process can have ...
0
votes
1answer
36 views

Linux OS/HW VM cooperation

From what i've learned, the HW is responsible for setting the accessed and dirty bits in the PTE of a process, and the OS is responsible for turning them off. My question is why? The first part, i ...
0
votes
1answer
1k views

What does “higher order address bits” and “lower order address bits” mean?

"Assume a system with 4 GB virtual memory and 1 GB physical memory with 32 bit addresses. if the page size is 4 KB, How many bits will be allocated as the Higher Order Address bits and Lower Order ...
1
vote
2answers
275 views

Does the Working Set Paging Algorithm use a separate page table?

I am doing research on paging algorithms. While learning about the working set algorithm from several scientific sources I was not really able to figure out where exactly the working set is defined or ...
1
vote
2answers
152 views

What is the difference between a page and thread?

"Each process that is executed is divided into blocks of same size, called pages." "Thread is a part of process being executed." Are pages and threads both part(s) of process? Whats the difference ...
0
votes
1answer
772 views

What happens when all reference bits set to 1 in Second Chance Page Replacement Algorithm?

I have a sequence like 5577334... and there are 3 frames available. After the 6th clock, all pages (5, 7 and 3) will have their reference bits set to 1. Now, when 4 comes in, 5 will go even though ...
1
vote
1answer
11k views

Explain Hashed page tables in operating system

I have a difficult time understanding hashed page tables used in virtual memory management. Here is picture of the slide that I am referring to: I understand that p is hashed and then the hash is ...
1
vote
0answers
464 views

Difference between inverted page table and a standard one?

I know that for standard page tables each process would have its own page table and for inverted the OS would have it. But other than this what are the main differences between a standard page table ...
0
votes
1answer
456 views

Effectiveness of TLB

This is a book question: Suppose that a machine has 48-bit virtual addresses and 32-bit physical addresses. Suppose this same system has a TLB (Translation Lookaside Buffer) with 32 ...
0
votes
1answer
3k views

Operating System: Performance of Demand Paging

I am reading Operating systems from the book "Operating System Concepts" by Peter Baer Galvin, 7th edition. Performance of Demand Paging: Let p be the probability of a page fault (0 $\leqslant$...
1
vote
2answers
50 views

If you increase the address space for an OS, does the Phys Mem used by the program increase?

I am learning about the OS. I know: that Address Space Size = # of pages x page size So if I increase Address Space Size, then the number of pages increases:(not the page size). However, isn't the ...
0
votes
2answers
892 views

Why page size = size of one cache way?

Why is that the page size equals the size of one cache way? My book states "A direct-mapped cache cannot be bigger than a page".
2
votes
4answers
13k views

Why do we need the valid-invalid bit in a page table?

I'm reading about memory management in Operating System Concepts, by A. Silberschatz. The author says: [...] the user process by definition is unable to access memory it does not own. It has no ...
1
vote
1answer
49 views

Is the term page replacement actually a misnomer?

My understanding is that "page replacement" entails replacing the contents of a frame to bring in a new frame in it's place corresponding to a new page. Since it is not the page, but the frame that ...
0
votes
1answer
3k views

What is the difference between caching, buffering and paging? Expecting a detailed answer on the OS level

I have been reading about caching and buffering it seems about the same to me can't get hold of the differences clearly and paging, for now the only difference I understand between paging and caching ...
2
votes
1answer
1k views

Operating system maintains copy of page table for each process

I am quoting a paragraph in Operating System Concepts by Silberschatz, in paging chapter, In addition, the operating system must be aware that user processes operate in user space, and all ...
3
votes
2answers
428 views

Paging: Does the page table of a process also gets swapped out when the process gets swapped out from main memory?

Does a process's page table too gets swapped out to secondary storage from main memory when the process gets swapped out to secondary storage from main memory? And gets swapped back in when the ...
-2
votes
1answer
9k views

Calculate the size of Logical and Physical Address

Suppose a logical address space of 32 pages of 2048 words. There are 64 frames in the main memory. According to given information calculate the various parameters related to paging. Calculate the ...
0
votes
2answers
2k views

Compute how much memory is needed for a two level page table

Im studying operating systems and i found an exercise that i cant solve. It asks to compute the memory space needed for a two level page table. The logical addresses are 32 bit, Page size is 4KB ...
-2
votes
2answers
257 views

page fault while executing machine instruction

A process executing machine instruction Y right after machine instruction x.On executing x It causes a page fault. what is the next instruction that is executed immediately on restarting the process. ?...
1
vote
2answers
839 views

Question on Virtual memory and Physical memory

This is the question where I'm stuck: With a 32-bit virtual address, 4 KB pages(12 offset bits), and 4 bytes per page table entry, we can compute the total page table size: Number of page table ...
1
vote
1answer
17k views

How to calculate virtual address space from page size, virtual address size and page table entry size?

I try to solve an exercise, unfortunately without any success yet. From the following given information, the virtual address space should be calculated: Page size is 16 KB Logical address size is 47 ...
2
votes
1answer
2k views

What are logical addresses and where do they actually reside?

While studying about memory management, paging and segmentation there is a lot of usage of phrases like CPU generates logical addresses and ...
3
votes
3answers
4k views

Virtual Address and Physical Address Space

A machine has 48-bit virtual addresses and 32-bit physical addresses. Pages are 8K. How many entries are needed for a conventional page table ? The answer is 2^35 entries Why not (2^32) / (2^13) = ...
9
votes
3answers
19k views

Is page size always equal to frame size?

I'm learning about paging. My book says that the logical addresses generated by the CPU are in the form |p|d|(page number, page offset) and the physical addresses ...
3
votes
2answers
2k views

How to calculate the size of a page in a two level paging CPU?

I am having difficulties with understanding the concept of paging. As a result I've got no idea how I can solve the following exercise - I'm lacking one more equation to solve it. I've read a lot ...
11
votes
2answers
9k views

Can someone explain this diagram about Slab Allocation?

I'm trying to understand how Slab Allocation works and why it is different or better than ordinary paging. I found this diagram which I believe would be helpful if it had more explanation. Some ...
1
vote
1answer
419 views

In an Inverted Page Table, will following chains happen very often for small addresses?

I just learned about the Inverted Page Table and immediately thought about the chaining model used. If two processes use the same virtual address, resolving the address will have to include following ...