=========================preview======================
(COMP252)final-2005-sol.pdf
Back to COMP252 Login to download
======================================================
COMP 252 Principles of Systems Software
Fall Semester 2005
Final Examination
Date: 13 Dec. 2005 Time: 4:30 pm - 6:30 pm (2 hours)
Name:__ SOLUTION _____ Student ID: ________________Email:____________________
Instructions
1. Please write your name, student ID, and email address on this page.
2. This is a 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 8 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
10
4
10
5
15
6
15
7
15
8
15
Total
100
Lecture Section
(circle one below)
1 2 3
1. (10 points) Answer the following questions in two sentences each:
a) (2 pts) Give one advantage and one disadvantage of priority CPU scheduling.
Advantage: higher priority processes can be given easier access to CPU.
Disadvantage: starvation problem
b) (2 pts) Give one advantage and one disadvantage of contiguous memory allocation.
Advantage: simple, easy to implement, hardware support is simple
Disadvantage: external fragmentation
c) (2 pts) Give one advantage and one disadvantage of FIFO page replacement algorithm.
Advantage: simple, easy to implement
Disadvantage: beladys anomaly, need to keep track of page timestamp
d) (2 pts) Give one advantage and one disadvantage of tree structured directory.
Advantage: supports multiple level directory structure with easy support for organizing files, efficient searching, grouping capability
Disadvantage: need to specify pathnames for files
e) (2 pts) Give one advantage and one disadvantage of indexed allocation for files.
Advantage: easy to support file expansion, easy for random access,
Disadvantage: even small files incur at least two block overhead for maintenance/access.
2. (10 points) The following questions are about file access methods:
a) (6 pts) State the different methods of file access. Do not define them, just state them! 1. Sequential Access
2. Direct Access
3. Indexed Access
b) (2 pts) What kind of access would be best suited for a MP3 audio file?
Sequential Access
c) (1pt) What kind of access is best suited for a file storing a database?
Indexed Access
d) (1 pt) What kind of access is b