ENSF 461 TEST BANK 2026 COMPLETE
QUESTIONS AND SOLUTIONS VERIFIED
RESULTS
●● Paging Approach.
Answer: Divide both the physical memory and the virtual address space
of each process into small fixed-size chunks called pages (or page
frames)
●● Paging - How many bits do we need to specify an address?.
Answer: 64 virtual addresses == 2^6 -> 6 bits
●● Paging - How do we know what page to look for?.
Answer: Virtual page number (VPN) is just the two highest-order bits.
●● Paging Example - [0][1][0][1][0][1]
(from right->left 4 bits are the offset, last 2 bits are the VPN)
1. What's the virtual address?
2. What's the virtual page number?
3. What's the offset, i.e., how many bytes into the page is this address?.
Answer: 1. 21
,2. Page 1
3. 5
●● Paging - Convert the virtual address 0x15 into a physical address
[][][][][][][]
(from right->left, first 4 bits are offset, last 3 bits are the PFN( aka.
physical frame number))
Step 1. encode the physical frame number
Step 2. encode the physical page offset.
Answer: 1. What's the physical frame number for virtual page 1?
According to the diagram, page 1 of AS is at 128, which is 2^7=128.
Therefore the physical frame number is 7.
7 = [ 1 ][ 1 ][ 1 ][ ][ ][ ][ ]
2. Offset stays the same from the virtual address:
[ 1 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ]
According to the virtual address 0x15 = 010101, the offset is
[ ][ ][ ][ 1 ][ 0 ][ 1 ][ 0 ]
Physical Address = 111010101
,●● Paging - How does the OS find a free page? One option is to keep a
free list ofavailable pages..
Answer: Because the pages are all the same size, the OS can just grab
the first page in the list.
●● Paging - How does the OS keep track of which process is using
which physical page?.
Answer: Using a per-process data structure called a page table.
●● Paging Pros.
Answer: - We don't have to allocate a physical page for all virtual pages
in the address space. (use the valid bit to keep track)
- We can use protection bits to mark pages as readable,writable, and/or
executable. (stored in the page table entry)
- We can swap pages from memory to disk and back again, allowing us
to support address spaces larger than physical memory. (use the present
bit to keep track)
- Different processes can share pages.
●● Linear Page Tables.
, Answer: A linear page table is the simplest implementation of the paging
per process data structure
Each row in this table is a page table entry describing the mapping for a
single page.
Each page table entry stores the information necessary for translation:
physical frame number, protection bits, present bit, valid bit, etc.
●● Linear Page Tables Question - How many pages might we need for a
32-bit address space? Assume 4KB pages.
Hint: how many bits do you need for the offset?
Given:
01_0101
(where 01 is the VPN and 0101 is the offset).
Answer: 4KB == 4096 == 2^12.
(1KB = 1024 bytes)
So you need 12 bits for the offset (from 2^12) and the other 20 (32-12 =
20) bits are used for the virtual page number.
QUESTIONS AND SOLUTIONS VERIFIED
RESULTS
●● Paging Approach.
Answer: Divide both the physical memory and the virtual address space
of each process into small fixed-size chunks called pages (or page
frames)
●● Paging - How many bits do we need to specify an address?.
Answer: 64 virtual addresses == 2^6 -> 6 bits
●● Paging - How do we know what page to look for?.
Answer: Virtual page number (VPN) is just the two highest-order bits.
●● Paging Example - [0][1][0][1][0][1]
(from right->left 4 bits are the offset, last 2 bits are the VPN)
1. What's the virtual address?
2. What's the virtual page number?
3. What's the offset, i.e., how many bytes into the page is this address?.
Answer: 1. 21
,2. Page 1
3. 5
●● Paging - Convert the virtual address 0x15 into a physical address
[][][][][][][]
(from right->left, first 4 bits are offset, last 3 bits are the PFN( aka.
physical frame number))
Step 1. encode the physical frame number
Step 2. encode the physical page offset.
Answer: 1. What's the physical frame number for virtual page 1?
According to the diagram, page 1 of AS is at 128, which is 2^7=128.
Therefore the physical frame number is 7.
7 = [ 1 ][ 1 ][ 1 ][ ][ ][ ][ ]
2. Offset stays the same from the virtual address:
[ 1 ][ 0 ][ 1 ][ 0 ][ 1 ][ 0 ]
According to the virtual address 0x15 = 010101, the offset is
[ ][ ][ ][ 1 ][ 0 ][ 1 ][ 0 ]
Physical Address = 111010101
,●● Paging - How does the OS find a free page? One option is to keep a
free list ofavailable pages..
Answer: Because the pages are all the same size, the OS can just grab
the first page in the list.
●● Paging - How does the OS keep track of which process is using
which physical page?.
Answer: Using a per-process data structure called a page table.
●● Paging Pros.
Answer: - We don't have to allocate a physical page for all virtual pages
in the address space. (use the valid bit to keep track)
- We can use protection bits to mark pages as readable,writable, and/or
executable. (stored in the page table entry)
- We can swap pages from memory to disk and back again, allowing us
to support address spaces larger than physical memory. (use the present
bit to keep track)
- Different processes can share pages.
●● Linear Page Tables.
, Answer: A linear page table is the simplest implementation of the paging
per process data structure
Each row in this table is a page table entry describing the mapping for a
single page.
Each page table entry stores the information necessary for translation:
physical frame number, protection bits, present bit, valid bit, etc.
●● Linear Page Tables Question - How many pages might we need for a
32-bit address space? Assume 4KB pages.
Hint: how many bits do you need for the offset?
Given:
01_0101
(where 01 is the VPN and 0101 is the offset).
Answer: 4KB == 4096 == 2^12.
(1KB = 1024 bytes)
So you need 12 bits for the offset (from 2^12) and the other 20 (32-12 =
20) bits are used for the virtual page number.