Shared Flashcard Set

Details

10.01: Virtual Memory-Paging 1
10.01: Virtual Memory-Paging 1
5
Computer Science
Undergraduate 3
11/12/2019

Additional Computer Science Flashcards

 


 

Cards

Term

A computer has 4 GiB of RAM with a page size of 8KiB. Processes have 1 GiB address spaces:

  1. How many bits are used for physical addresses?
  2. How many bits are used for logical addresses?
  3. How many bits are used for logical page numbers?
Definition
  1. 2^2 * 2^30 = 2^32. So 32-bit physical addresses
  2. 2^30. 30-bit logical addresses
  3. (2^30)/(2^13) = 2^17. So 17 bits are used for logical page numbers
Term
Logical addresses are 44-bit, and a process can have up to 2^27 pages. What is the page size?
Definition
2^44 / 2^27 = 2^17 bytes = 128 KiB in a page
Term
On my copmuter the page size is 16 KiB, and my process' address space is 4GiB. How many bits are used for the page number in a logical address?
Definition
2^32 / 2^14 = 2^18 pages. So 18-bit pages.
Term

A computer has 32-bit physical addresses. The logical page number of a logical address is 14-bit. A process can have up to a 2GiB address space. Let’s consider a process with currently a 1GiB address space (i.e., it can get up to another 1GiB during execution).

  1. What is the page size
  2. How many entries are there in the process; page table?
Definition
  1. How many bytes in 2GiB (the max address space): 231 Therefore: 31-bit logical addresses Therefore: 31 - 14 = 17-bit offsets Therefore: 2^17 bytes in a page Therefore: 128KiB pages
  2. The process has a 1GiB = 230-byte address space Number of pages in the address space: 2^30 / 2^17 = 2^13 Therefore: there are 2^13 entries in the page table (one entry per page)
Term

Logical addresses are 40-bit, and a process can use at most 1/4 of the physical RAM.

  1. How big is the RAM?
  2. A process has at most 2^22 pages on this system. How many bits are used for the “offset” part of logical addresses?
Definition
  1. With 40-bit logical addresses, an address space is at most 240 bytes. So the RAM is 4 times as big: 242 bytes which is 4TiB
  2. Since we have 2^22 pages, 22 bits are used for the page number. Therefore 40 - 22 = 18 bits are used for the offset
Supporting users have an ad free experience!