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
1answer
20 views

Are Paging and page cache the same in Operating system?

I was looking at paging in OS. It seems like there are two concepts with the same name but with different features, and I wanted to be clear about those, Paging and page cache. Before I thought paging ...
0
votes
1answer
18 views

Are pages moved to the disk when the process is scheduled?

When process A has run long enough and the scheduler decides to run process B, will all the pages of process A be moved to the disk or they remain in the main memory?
0
votes
1answer
52 views

Where are process pages stored - in the swap space or under file system? Can demand paging work without space space?

The Galvin OS text says that on older systems, there used to be a method, where the entire running process (when in idle state) was moved from the main memory (when main memory ran low) to the disk ...
3
votes
2answers
608 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 ...
0
votes
1answer
354 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 ...
0
votes
0answers
22 views

The memory a page table occupies and finding the # of pages within it

Was doing some practice and saw this question: Assume we’re working on a machine which has the following parameters: • 16GiB of physical memory • 22 bit virtual addresses • 128B pages • Each PTE in ...
1
vote
2answers
792 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 ...
1
vote
0answers
7 views

How could one construct a TLB so that not all the bits of the presented address need match to result in a hit?

I was wondering besides the typical matching of all bits in the presented address to the resulting page, is there another way of doing so? what are the benefits/ cons and how would one go about doing ...
4
votes
1answer
112 views

Why do we need hashed page tables for Paging in Operating Systems?

I understand that we might need hierarchical paging to handle page tables with sizes greater than the size of one frame, but what is the use of Hashed Page tables then? I would understand if we were ...
3
votes
4answers
16k 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
votes
1answer
87 views

Page Size, Physical Memory Size, max Program Size

In a 64 bit computer, the logical address space is 64MB and physical memory size is 2GB. Paging is implemented with 4KB pages. Determine the logical and physical address components. (That is, how many ...
1
vote
1answer
119 views

How page table base register (PTBR) is used to locate the correct frame using Page Number?

I was reading about paging in OS , and one of the things I saw was the page table base register (PTBR). If the CPU generates a logical address (Consists of Page number + Offset) it needs to be mapped ...
0
votes
0answers
38 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
40 views

Is paging the division of processes and segmentation the division of main memory?

This is what I know thus far, logical address space is the processes and physical address space is the memory. If paging is the division of logical address space and segmentation the division of ...
0
votes
2answers
921 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
30 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
58 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
28 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
57 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, ...
10
votes
3answers
23k 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 ...
0
votes
1answer
219 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
151 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 ...
5
votes
1answer
549 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
84 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
72 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
1k views

Segmentation and paging

I am given a system with a segmented paging architecture. Both physical and virtual address spaces contain $2^{16}$ bytes each. The virtual address space is divided in $8$ equal size segments. The ...
1
vote
1answer
4k 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 ...
1
vote
1answer
70 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
1answer
505 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 ...
5
votes
3answers
7k views

Look Ahead buffer vs Translation Look aside buffer

I know that Translation look aside buffer is used for address translation in paging to achieve better performance. I came across term called Look Ahead buffer in a document which said it implements ...
2
votes
1answer
397 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
445 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
993 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
1answer
156 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
0answers
373 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 ...
6
votes
2answers
36k views

How does increasing the page size affect the number of page faults?

If we let the physical memory size remain constant, What effect does the size of the page have on the number of frames? What effect does the number of frames have on the number of page faults? Also,...
2
votes
4answers
10k views

Calculation of effective average instruction execution time in a 2-level paging system

System has a two level paging scheme Average CPU time for a instruction = 100ns Average number of memory accesses per instruction = 2 Regular memory access = 150 ns Page fault service time = ...
3
votes
3answers
6k 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) = ...
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
2k 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 ...
0
votes
2answers
711 views

Hierarchical Paging memory requirements

OS Book written by Galvin et all states that if page size is 4KB and size of virtual space is 32 bits then 2^(32-12) page entries would be required which is too huge to store in memory!! Therefore ...
1
vote
2answers
229 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 ...
1
vote
2answers
296 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 ...
0
votes
1answer
505 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 ...
9
votes
2answers
39k views

Clock page replacement algorithm - Already existing pages

When simulating the clock page replacement algorithm, when a reference comes in which is already in memory, does the clock hand still increment? Here is an example: With 4 slots, using the clock ...
1
vote
1answer
12k 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 ...
0
votes
1answer
916 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 ...
3
votes
2answers
3k 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 ...
1
vote
0answers
519 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 ...