Computer Science 162 - Fall 2000 - Smith - Midterm 1

Computer Science 162 - Fall 2000 - Smith - Midterm 1 -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: file:///C|/Documents%20and%20Settings/Jason%20Raftery/My%20Doc...ence%20162%20-%20Fall%202000%20-%20Smith%20-%20Midterm%201.txt Smith: 1. What advantages (if any) are there in having different quantum sizes on different levels of a multilevel foreground-background scheduling algorithm? Describe how you would use different quantum sizes to optimize performance. (10) >Multilevel foreground-background systems consist of a series of queues. Jobs in the highest priority (foreground) queue(s) have priority over those in lower priority queues. Frequently, jobs are first run in the highest priority queue, and if they exceed their quantum, are demoted to successively lower queues. Jobs that do not exceed their quantum (e.g. I/O intensive jobs) are typically returned to the highest priority queue after returning from being blocked. Frequently, the queue length in the highest priority queue is short, so that high priority jobs can get immediate service, and if short, can complete quickly. Queue lengths for lower priority queues are typically longer, so that (a) the overhead of starting the job (e.g. moving it into the in-memory queue) can be amortized over a longer run interval; (b) jobs requiring longer run times will receive larger amounts of service (due to the longer queue length) and so will make progress toward completion. Smith: 2. What's the difference between internal and external fragmentation? Which applies to segmentation (without paging) and which applies to a pure paging system? Explain. Also explain the possible effect of each on system performance. (10) >Internal fragmentation occurs when a block is allocated that is larger than the data it must contain. This applies to paging, since pages are fixed size. The range of virtual addresses used by a process may not be contiguous, and each range of used addresses will typically occupy only part of one or more blocks. Even if a contiguous region of virtual space is used, part of the last page will be unused. External fragmentation occurs when variable size blocks are allocated and deallocated in a free storage area. Small regions of unallocated space will occur between allocated regions. The small unallocated spaces will be too small to satisfy storage requests, and thus will be wasted. This occurs with segmentation, since segments are of variable size. file:///C|/Documents%20and%20Settings/Jason%20Rafte...20-%20Fall%202000%20-%20Smith%20-%20Midterm%201.txt (1 of 6)1/27/2007 4:00:11 PM file:///C|/Documents%20and%20Settings/Jason%20Raftery/My%20Doc...ence%20162%20-%20Fall%202000%20-%20Smith%20-%20Midterm%201.txt Either type of fragmentation will cause wasted memory space, which will on the average decrease the average level of multiprogramming, and therefore...
View Full Document

Page1 / 6

Computer Science 162 - Fall 2000 - Smith - Midterm 1 -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online