answer_quiz10 - 408 Coding School

Quiz#10 (CS500 OSD, Spring, 2016)
Group number: ______________________
1. Student ID:__________ Name: __________ 2. Student ID:__________ Name: __________
3. Student ID:__________ Name: __________ 4. Student ID:__________ Name: __________
1) Suppose the permissions for the home directory (~ or $HOME) is set to 761 (by Linux
command "chmod 761 ~"). Fill in Yes or NO for each entry of the following access control
matrix to the home directory.
Read
Write
User
A
Yes
Group
yes
yes
Others
G
H
Which of the following is not True?
a)
b)
c)
d)
e)
execute
Yes
F
I
A=yes
F=no
G=no
H=no
I=no
2) 1. In an environment where several processes may open the same file at the same time, the
operating system typically uses internal tables called the ___________ tables to keep track of
open files (Choose two).
a) system-wide
b) per-disk
c) per-partition
d) per-process
3) Suppose that the operating system uses two internal tables to keep track of open files.
Process A has 2 files open and process B has 3 files open. Two of these files are shared
between the two processes. How many entries are in the per-process table of process A, the
per process table of process B, and the system-wide tables, respectively?
a)
b)
c)
d)
5, 5, 5
2, 3, 3
2, 3, 5
2, 3, 1
4) Which of the following allocation methods ensures that only one access is needed to get a
disk block using direct access?
a) linked allocation
b) indexed allocation
c) hashed allocation
d) contiguous allocation
5) The free-space list can be implemented using a bit vector approach. Which of the following is
a drawback of this technique?
a) To traverse the list, each block must be read on the disk.
b) It is not feasible to keep the entire list in main memory for large disks.
c) The technique is more complicated than most other techniques.
d) This technique is not feasible for small disks.
1
Consider a disk queue holding requests to the following cylinders in the listed order: 116, 22, 3,
11, 75, 185, 100, 87. Assuming the disk head is at cylinder 88 and moving upward through the
cylinders. Consider the following sequence.
A) 116 - 22 - 3 - 11 - 75 - 185 - 100 - 87
B) 100 - 116 - 185 - 87 - 75 - 22 - 11 - 3
C) 87 - 75 - 100 - 116 - 185 - 22 - 11 - 3
D) 100 - 116 - 185 - 3 - 11 - 22 - 75 - 87
Which of the above sequence is the order that the requests are serviced using the
6) SCAN scheduling algorithm? (1pt) Ans: ________B_________
7) FCFS scheduling algorithm? (1pt) Ans: _________A________
8) SSTF scheduling algorithm? (1pt) Ans: _________C________
9) C-SCAN scheduling algorithm?(1pt) Ans: _________D________
2