CSCI 3500: Studio 15

Paged Memory

Modern computer systems use paging to manage memory, which allows many processes to use memory in a way that is very efficient and flexible.

In this studio, you will:

  1. Do memory paging examples
  2. Think about tradeoffs in paged memory systems

Please complete the required exercises below, as well as any optional enrichment exercises that you wish to complete.

As you work through these exercises, please record your answers in a text file. When finished, submit your work by sending your text file and source code to with the phrase Paging in the subject line.

Make sure that the name of each person who worked on these exercises is listed in the first answer, and make sure you number each of your responses so it is easy to match your responses with each exercise.

Required Exercises

  1. As the answer to the first exercise, list the names of the people who worked together on this studio.

  2. Modern Linux systems commonly use a page size of 4KB (2^10 times 4 bytes). Suppose a given computer has 1GB (2^30 bytes) of memory. How many page frames does this machine have?

  3. Modern x86_64 systems use a 48-bit address space with byte-level addressing. How many bytes can a modern x86_64 process address?

    How many 4KB pages could theoretically exist inside a single process that uses a 48-bit address space?

  4. Suppose a program on such a system tries to access the memory location at (decimal) address 10500. What page does this address reside in and what is its offset within that page?

  5. Suppose the page from the previous exercise has been placed in the 67th page frame. What absolute physical address is generated?

  6. Suppose you want to play a high def movie that's 15 gigabytes large. Supposing your system uses 4KB pages, how many page faults should you expect over the life of the movie?

  7. Now you're playing the same movie on a system with 32KB pages. How many page faults should you expect now?

  8. Say you're designing your own operating system, and you want to implement your own paging system. Give one advantage of having small page sizes and give one advantage of having large page sizes.

  9. Suppose your program needs to open a file and read a single byte from that file. Knowing what you know now, how much data does this actually require transferring from the computer disk to memory?

Optional Enrichment Exercises

  1. No optional exercises