Buscar

Exam-Sample

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Prévia do material em texto

HAIFA UNIVERSITY – CS-ADVANCED OS - EXAM – JULY 2002 
For each of the following questions select the most appropriate answer. The correct answer entitles you 
to the number of points quoted with the question. If you don't select any answer you will get 0(zero) 
points. An incorrect answer will get you –1 (minus one) point. 
 
 
 
1. (2 points) On a Distributed Virtual Memory multiprocessor 
a. a virtual memory page may be cached only one of the machines 
b. a virtual memory page may be cached on any number of machines provided it is unchanged 
c. a virtual memory page may be cached on any number of machines provided it is changed 
2. (3 points) Compare-and-Swap as a synchronization primitive for SMP machines: 
a. is always performing good as does not involve cache invalidation 
b. can be used only on single processor machines 
c. can be used only with interrupts disabled 
d. it negatively affects performance only when used with spin-locking 
e. it is good only when used with spin-locking 
3. (3 points) The following is a log of arrivals and departures of customers to a queuing system, in the 
time interval [0,5}. For simplicity, we assume that all arrivals and departures occur at whole number 
of seconds only. 
Toward time 0, there were 6 customers in the system 
At time 0, 2 arrived and 1 left 
At time 1, 1 arrived and 2 left 
At time 2, 0 arrived and 0 left 
At time 3, 2 arrived and 0 left 
At time 4, 1 arrived and 2 left 
This and the following 2 questions refer to this figure, which is assumed to be representative of a 
system in a steady state. What is the average number of customers in this system, during the time 
interval [0,5]? 
a. 7 
b. 2 
c. 6.8 
d. 5 
e. 6 
 
Formulae, Definitions and Theorems: 
 
 
• Poisson Dist. with parameter !: fX(x) = e-! !x / x! x=0,1,2,3,… 
• Exponential Dist. with parameter ": fX(x) = "e-"x for x ú 0; = 0 otherwise and 
FX(x) = 1 - e-"x , for x ú 0; = 0 otherwise 
• In a Poisson process with arrival rate !, the number of arrivals in any time interval of length 
t is Poisson distributed with parameter !t 
• Theorems: The inter-arrival times of a Poisson Process with rate ! are exponentially 
distributed with parameter !. 
• The average number of customers in an M / M / 1 system, with arrival rate ! and service 
rate ", is N=! / ("-!) 
 
 
4. (3 points) A DSF File Manager: 
a. Manages a predermined set of files 
b. Manages files that are allocated to it dynamically as they open 
c. Manages all the files that reside on a specific disk 
d. Manges all the files opend by a specific client 
HAIFA UNIVERSITY – CS-ADVANCED OS - EXAM – JULY 2002 
5. (3 points) In an operating system there is usually a sync daemon that sends, every fixed time 
interval (30 seconds), a request to all the file systems to flush all the dirty data in their caches to 
disk. How will you alleviate those problems to improve the overall file system behavior?? 
a. Introduce an internal thread that continuously flushes dirty entries that haven’t been modified 
for a while 
b. Disable the sync daemon 
c. Increase the time between sync intervals 
d. Flush every write directly to disk 
6. (2 point) In the MISD (pipelined) processing model: 
a. the same instruction stream operates on several data streams 
b. different instruction streams operate on different data streams 
c. multiple instructions operate in sequence on the same data stream 
d. all of the above 
e. none of the above 
7. (3 points) In a transaction processing system atomic operations are: 
a. all instructions on the machine 
b. subroutine calls 
c. operations that act as a group and make visible all their changes or none 
d. operations that act as a group and succeed always 
e. never externalize their results 
8. (5 points) Is it acceptable to do the following sequence lock-update-unlock-lock-read-update-
commit-unlock 
a. yes – locks are held until after commit 
b. no – locking after unlocking is forbidden 
9. (5 points) Cascaded aborts are caused by: 
a. reading uncommited data 
b. overwritting uncommited data 
c. reading data then aborting 
d. all of the above 
e. a and b 
10. (3 points) Parallel Computing involves communication between processes. Parallelization is more 
effective when : 
a. the ratio of communication to computing is high 
b. the ratio communication to computing is low

Continue navegando