NOTE: Essentially all questions on this test can be answered in one short paragraph or less! There are no long essay questions here!
This exam is worth 1/5 of the final grade (20 points; allocate 2 minutes per point).
Part A: Assuming that sbrk() operates exactly as described, write pseudocode to compute the page size of the system using two consecutive calls to sbrk(). (This takes 3 statements at the very most!) (1 point)
Part B: There are 3 quite different reasons that sbrk() could fail. The one that depends on specific details of UNIX is: A failure will occur when a user attempts to allocate more memory than that user's resource limit. The other two reasons have nothing to do with UNIX and depend only on details of paged virtual memory. What are they? (1.5 points)
Part A: What information must each entry in the page table contain? Emphasize any details that differ from the page table on a system with a single address space. (1.5 points)
Part B: How would you change your answer above if all pages (whether shared or not) were organized into segments -- where a segment is defined as a sequence of pages that are inserted into consecutive virtual addresses of a user's address space on an all-or-nothing basis. (1.5 points)
Part C: How would you change your answer if it was legal to open a file "into" the virtual address space of a process, as in MULTICS. (1.5 points)
Part A: What minimal condition guarantees that a user will not be able to create a capability for a random page in memory. (This condition will typically be violated in only one place -- the memory manager, which must be able to create capabilities for any page in memory.) (1.5 points)
Part B: Suppose a user on this system wishes to pass a capability for a page to some other user. What prior condition must exist to allow this? (1.5 points)
Part C: How can you model this system with an access matrix? Pay special attention in your answer to how the contents of the access matrix may be modified under this system! (1.5 points)
Part A: What is the minimal set of object classes this process manager should support and what are the basic operations applicable to members of these classes? (Note: In answering this question, a limited amount of object orientation is worth quite a bit, but excessive object orientation can get you bogged down in near-nonsense.) (1.5 points)
Part B: What lower-level resource manager would need to be implemented first, in order to support the process manager? That is, what resource manager is required by one or more process manager operations. (1.5 points)
Part A: Describe, in about as much detail as was given above, how a user would read the contents of a disk sector. Pay particular attention to questions of who allocates or deallocates buffers. (1 point)
Part B: For the example given involving disk I/O, what goes in the disk request queue and how does this differ between input and output requests? (1.5 points)
Part C: One specific design detail is not addressed in the background information above, but you may have accidentally solved it in your answers to parts A or B. Supposing that, on input, the disk interrupt service routine is responsible for allocating buffers, how would (or how did) you allow the user to learn what buffer had been allocated? (1.5 points)
Part D: Does this system pose risk of deadlock? Explain! (1.5 points)