Homework #7

Assigned: April 12
Due: April 21, 3:00pm, in class


  1. (2+3=5 points) [OSCJ] exercise 8.10 on p. 388 (or exercise 8.2 on p. 342 of the 7th ed). Consider the following process for generating binaries. A compiler is used to generate the object code for individual modules, and a linkage editor is used to combine multiple object modules into a single program executable. How does the linkage editor change the binding of instructions and data to memory addresses? What information needs to be passed from the compiler to the linkage editor to facilitate the memory binding tasks from the linkage editor?

  2. (4+2=6 points) [OSCJ] 8.11 on p. 388 (or exercise 8.3 on p. 342 of the 7th ed). Given five fixed memory parititons of 100k, 500k, 200k, 300k, and 600k (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of (p1) 212k, (p2) 417k, (p3) 112k, and (p4) 426k (in order)? Which algorithm makes the most efficient use of memory?

  3. (2+2+2=6 points) [OSCJ] exercise 8.13 on pp. 388-389 (or exercise 8.5 on p. 343 of the 7th ed). Compare the main memory organization schemes of contiguous-memory allocation, pure paging, and pure segmentation with respect to the following issues:

    • external fragmentation
    • internal fragmentation
    • ability to share code across processes

  4. (1+2+2=5 points) [OSCJ] exercise 8.16 on p. 389 (or exercise 8.8 on p. 343 of the 7th ed). Program binaries in many systems are typically structured as depicted in this diagram which we have discussed often in class. Code is stored starting with a small fixed virtual address such as 0. The code segment is followed by the data segment which is used for storing the program variables. When the program starts executing, the stack is allocated at the other end of the virtual address space and is allowed to grow today the lower virtual addresses. What is the significance of the above structure on the following memory management schemes:

    1. contiguous-memory allocation
    2. pure paging
    3. pure segmentation

  5. (2+3=5 points) [OSCJ] exercise 8.20 on pp. 389-390 (or exercise 8.9 on p. 343 of the 7th ed). Consider a paging system with the page table stored in main memory.

    1. If a memory reference takes 200 ns, how long does a paged memory reference take?
    2. If we add a TLB, and 75% of all page-table references are found in the TLB, what is the effective memory reference time? You may assume that finding a page-table entry in the TLB takes zero time if the entry is present (an unrealistic assumption).

  6. (1+1+1+1+1=5 points) [OSCJ] exercise 8.23 on p. 390 (or exercise 8.12 on p. 344 of the 7th ed). 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

  7. (10 points extra credit) Write a 250 word synopsis of this course. The audience of your essay is a computer science or engineering student who has yet to take an operating systems course in their program of study. Answer the following two questions in your essay: what is a course in operating systems about? What is studied? Full credit will only be awarded to students who write a clear and succinct essay. Only students who submit problems 1-6 are eligible to submit this extra credit essay.

  8. (15 points extra credit) Write a 250 word reflection essay of this course. The audience of your essay is a computer science or engineering student who has yet to take an operating systems course in their program of study. Answer the following questions in your essay:
    • How are the seven modules of this course related to each other? Are they dependent on each other or independent of each other or both? How do these modules fit together to paint a picture of operating systems? Explain. If you say the modules/topics are independent of each, submit a diagram illustrating how they are related.
    • Did you see the courses themes and objectives come to life throughout the content of this course?
    Full credit will only be awarded to students who write a clear and succinct essay. Only students who submit problems 1-7 are eligible to submit this extra credit essay.

Return Home