=========================preview======================
(COMP252)Final_06Fall.pdf
Back to COMP252 Login to download
======================================================
Dept. of Computer Science Lecture Section (circle one below)
COMP 252 Operating Systems Fall Semester 2006 1 2 3 Final Examination
Date: 19 Dec. 2006 Time: 8:30 am - 10:30 am (2 hours)
Name:_____________________ Student ID: ________________Email:____________________
Instructions
1.
Please write your name, student ID, and email address on this page.

2.
This isa CLOSED book exam!

3.
You have 2 hours (120 minutes) to complete this exam.

4.
Please answer all questions within the space provided on the examination paper. You may use back of the pages for your rough work. Please be concise, and this is NOT an essay contest.

5.
This paper consists of 6 questions and 8 pages.

6.
Please read each question very carefully and answer the questions carefully and clearly to the point. DO NOT WRITE LONG STORIES. IF YOUR ANSWERS ARE LONGER THAN SPECIFIED, THEN THEY WILL AUTOMATICALLY BE MARKED INCORRECT. Make sure your answers are neatly written, legible, and readable.

7.
Show all the steps used in deriving your answer, wherever appropriate.


Question Points Score
1 10
2 10
3 20
4 25
5 20
6 15
Total 100


Dept. of Computer Science HKUST
1. (10 points) Answer the following questions in two sentences each: a) (2 pts) Give one advantage and one disadvantage of segmentation.
Advantage:
Small segment map table, or
No internal fragmentation
Disadvantage:
External fragmentation, or
Allocation granularity may be too large for efficient memory utilization, e.g. have a big segment but only access a small part of it for a long time. Waste memory used to hold the rest.
b) (2 pts) What is Beladys Anomaly?
Certain page reference patterns actually cause more page faults when number of page frames
allocated to a process is increased
c) (2 pts) Give one advantage and one disadvantage of free space management in file systems using bitmaps compared to free space management using free lists?
Advantage:
The file system can quickly determine if contiguous blocks are available at certain locations on
secondary storage

Disadvantage:
The file system may need to search the entire bitmap to find a free block, resulting in substantial
execution overhead
d) (2 pts) What is the major difference between signal-and-exit and signal-and-continue monitors?
signal-and-exit requires thread to exit the monitor immediately upon signaling.
signal-and-continue allows thread inside monitor to signal that the monitor will soon become
available while still maintaining lock on the monitor until thread exits monitor.
e) (2 pts) Give one advantage and one disadvantage of supporting virtual memory.
Advantage:
Program size can be larger than the physical memory size, or
Creates the illusion that more memory exists than is available in system.
Disadvantage:
It incurs page table lookup overhead upon page fault.
Dept. of Computer Science HKUST
2. (10