finalsp06solutions - Name CS 414 Final Netid This exam is...

Info icon This preview shows pages 1–2. Sign up to view the full content.

Name: Netid: CS 414 Final This exam is closed book. You have 120 minutes to answer all questions. Show your work for partial credit. 1. Answer TRUE or FALSE (1 point for a correct answer, -0.5 for an incorrect answer) [12] (a) Large, fragmented and sparse virtual address spaces diminish performance by reducing spatial locality and consequently lowering TLB hit ratios. False. Spatial locality refers to the tendency of many programs to reference objects that span a few pages within a segment and hence to reference virtual page numbers that are close to one-another. This is going to be common no matter how the address space as a whole happens to look. (b) If we wish to guarantee the very best possible response time for interactive applications, we will need to use a scheduling policy that might not give the shortest possible completion times for long running tasks. True: We’ll need to prioritize interactive applications over long-running tasks, so they will be delayed and won’t complete as soon. (c) If a disk driver is permitted to arbitrarily reorder disk I/O operations from a Unix filesystem to minimize seek time and a crash occurs while the disk is being updated, then upon rebooting we might find that a single disk block is shown as being in two or more files. True. For example, if a file were freed and then some block from it was reallocated from the block freelist to some other file, but the changes were written to the disk out of order, perhaps only the inode update for the very last of these operations will have been recorded on disk by the time of the crash. On restart the single block will be listed as being in two files (and the deleted file will still be shown as if it hadn’t been deleted). (d) Scheduling and synchronization between threads are more efficient from an application perspective when user level threads are used rather than kernel threads i.e., threads associated with distinct CPU contexts. Hence we should always use user level threads. False. The first part of the statement is actually true - scheduling and synchronization tend to be cheapest if implemented close to where the threads are used. But the conclusion is just false - there are many situations where we would want multiple kernel threads, notably if an application wants to do I/O operations while also doing some other user-level task like rendering an image. (e) When using the LRU policy for page replacement, increasing the number of resident pages (Δ in the policy) always increases performance of the application. False: The page miss rate could remain unchanged, for example if the working set was already in memory, or if Δ is still too small and the increase just wasn’t large enough to make any difference. (f) Internal fragmentation is the only reason for not having large page size.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 2
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '06
  • Virtual memory, atomic swap, Item void void, void void void, void void *pop, large page size

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern