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.

0
votes
0answers
14 views

Why we need size of the page table should be some fraction of virtual address space

The Page Table should have all virtual page number which are in its logical address space, Why it's the case? Is it because we want to access Page Table entry fast just like an array where key is ...
0
votes
1answer
22 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
0answers
20 views

Calculate the size of memory protection register

One of the methods for virtual memory protection is using a register of accessible pages for every active process. How many bits should the length of this register be, considering: physical memory ...
0
votes
1answer
55 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
0answers
54 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 ...
0
votes
0answers
11 views

Are TLB entries sorted by Virtual Address?

Are TLB entries sorted. if a virtual address needs to be translated into physical address. Does it have to locate all the TLB entries ?
2
votes
1answer
34 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
0answers
25 views

If the string of N requests is repeated many times, which of the following is/are true?

If the string of N requests is repeated many times, which of the following is/are true? I. The fewest page faults occur when M ≥ N. II. LRU (least-recently-used) and FIFO (first-in-first-out) will ...
0
votes
1answer
168 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
249 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 ...
0
votes
0answers
12 views

If the number of pages exceeds the number of frames, how can the process finish using Virtual Memory?

Mapping is not for paging, is it? For instance if we have 12 pages and 8 frames. If 7 out of these 12 pages are loaded into the main memory, how can the process terminate?
1
vote
0answers
145 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
82 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. ...
0
votes
0answers
489 views

calculate logical address and physical address by using page table with invalid and valid bit

I have an exercise which is unclear to me. The exercise is about paging(operating system). Exercise is: e. Translate into physical addresses the one(s) which are both legal and in memory. f. What ...
1
vote
1answer
745 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
0answers
100 views

Effective memory access time in case of multi-level paging with virtual memory

In multi-level paging with virtual memory, If I am using local page replacement algorithm (which I think is practically used), then there is no priority followed and pages at higher level can be ...
0
votes
1answer
32 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
396 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
194 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
48 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
452 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
7k 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
297 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
302 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
2k 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
41 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
464 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".
1
vote
4answers
7k 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
48 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
2k 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
689 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
0answers
210 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
2k 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
1k 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
131 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
737 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
10k 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 ...
1
vote
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
3k 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) = ...
7
votes
2answers
13k 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 ...
9
votes
2answers
7k 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
334 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 ...
3
votes
1answer
3k views

Page Table Size in a 4 Level Hierarchical Page Table

An Intel 64 bit CPU uses a four-level hierarchical page table. Each of the four levels of the page table can contain 512 entries, and the page table size is 4KB. You should be able to see that it ...
1
vote
0answers
397 views

Clock variant of the Second-Chance page-replacement Algorithm vs. standard Second-Chance Algorithm

A sample question for my upcoming Operating Systems exam is: Under which circumstances would the clock variant [of the second-chance algorithm] be preferred over the standard second-chance ...
0
votes
1answer
410 views

How does cpu fetch active program data (using virtual address) from storage when there is a page fault?

I read that cpu generates virtual address and using the same mmu translates to physical address and then fetches the data from RAM. But when there is a page fault, the data is fetched from the HDD(or ...
2
votes
1answer
1k views

Second Chance Page Replacement

In the second chance page replacement algorithm, if a page's reference bit is already set to 1, and the next page in line of the reference string is the same page, does the reference bit stay at 1 or ...
1
vote
2answers
204 views

Can this question be solved without knowing the Page Table Entry?

I'm preparing for the exams and this question came up - Consider a machine with $64MB$ physical memory and a $32$-bit virtual address space. If the page size is $4KB$, what is the approximate size ...
3
votes
1answer
275 views

Best design of a software controlled page table: to echo the TLB?

I am building some simple system software for the Microblaze FPGA (actually being run on OVPsim at least for now). The system is to experiment with various memory management regimes. The first ...
1
vote
1answer
2k views

Does Second chance Page replacement algorithm suffer with Belady's anomaly?

In Second chance Page replacement algorithm(clock algorithm), if all the Reference bits are set to one, then the algorithm behaves just as FIFO. Considering this case, can we conclude that Second ...