Homework 08: Chapter 08 Questions


Due: Thursday, March 20th by 5:59 PM
Assignment ID: hwk08

Header

Please put the following at the top of a flat text file, hwk08.txt:

Homework Questions

Write the answers to the following questions in hwk08.txt:
  1. Why are page sizes always powers of 2?
  2. Explain the difference between internal and external fragmentation.
  3. Most systems allow programs to allocate more memory to its address space during execution. Data allocated in the heap segments of programs are an example of such allocated memory. What is required to support dynamic memory allocation in the following schemes:
    1. Contiguous-memory allocation
    2. Pure segmentation
    3. Pure paging
  4. On a system with paging, a process cannot access memory that it does not own;
    1. Why?
    2. How could the operating system allow access to other memory?
    3. Why should it or should it not?
  5. Assuming a 1 KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers):
    1. 2375
    2. 19366
    3. 30000
    4. 256
    5. 16385
  6. Consider the following segment table:
    Segment	 Base	       Length
    0	 219	       600
    1	 2300	       14
    2	 90	       100
    3	 1327	       580
    4	 1952	       96
    
    What are the physical addresses for the following logical addresses?
    1. 0,430
    2. 1,10
    3. 2,500
    4. 3,400
    5. 4,112

Submission

Submit hwk08.txt using the handin program. For example, for this homework, type the following in a terminal exactly as it appears:
  handin  hwk08  hwk08.txt

Alternatively, you can submit the assignment from any computer via PeerSpace. After successfully logging into PeerSpace, go to Tools, then Assignments. Click on the Submit link.