Professional Documents
Culture Documents
NAME : _____________________________________________________________
This is a closed book exam. You have 3 hours to complete 37 questions. Please write
neatly and clearly. You should have 12 pages.
Question Grade
1-33 ____/72
34 ____/23
35 ____/33
36 ____/12
37 ____/10
Total ____/150
6. (2 points) When using semaphores, a process invokes the down() operation before
accessing its critical section, followed by the up() operation upon completion of its
critical section. Consider reversing the order of these two operations—first calling
up(), then calling down(). What would be a possible outcome of this?
a) Starvation is possible.
b) Several processes could be active in their critical sections at the same time.
c) Mutual exclusion is still assured.
d) Deadlock is possible.
7. (2 points) An address generated by a CPU is referred to as a ____.
a) physical address
b) logical address
c) post relocation register address
d) Memory-Management Unit (MMU) generated address
11. (2 points) Which of the following is a benefit of allowing a program that is only
partially in memory to execute?
a) Programs can be written to use more memory than is available in physical memory.
b) CPU utilization and throughput is increased.
c) Less I/O is needed to load or swap each user program into memory.
d) All of the above
16. (2 points) The _____ allocation algorithm allocates available memory to each process
according to its size.
a) equal
b) global
c) proportional
d) slab
17. (2 points) ________ allows the parent and child processes to initially share the same
pages, but when either process modifies a page, a copy of the shared page is created.
a) copy-on-write
b) zero-fill-on-demand
c) memory-mapped
d) fork
18. (2 points) _____ occurs when a process spends more time paging than executing.
a) Thrashing
b) Memory-mapping
c) Demand paging
d) Swapping
19. (2 points) The UNIX system identifies a file as an executable binary file by _______-
a) file name
b) file extension
c) file descriptor
d) magic number of the file header
20. (2 points) Transfers between memory and disk are performed a ____.
a) byte at a time
b) file at a time
c) block at a time
d) sector at a time
21. (2 points)Which of the following is the simplest method for implementing a directory?
a) tree data structure
b) linear list
c) hash table
d) nonlinear list
22. (2 points) 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
27. (2 points) A disk with free blocks 0,1,5,9,15 would be represented with what bit map?
a) 0011101110111110
b) 1100010001000001
c) 0100010001000001
d) 1100010001000000
28. (2 points) The value of a counting semaphore can range only between 0 and 1
(True/False)
30. (2 points) Hashed page tables are commonly used when handling addresses larger
than 32 bits (True/False).
32. (2 points) On a system with demand-paging, a process will experience a high page
fault rate when the process begins execution (True/False).
b. (6 points) What three conditions must be satisfied in order to solve the critical
section problem?
a. (5 points) The TLB is smaller than the page table and the number of frames.
Why?
d. (10 points) Explain the sequence of events that happens when a page-fault
occurs.
e. (6 points) What is the advantage and disadvantage of a local replacement
algorithm?
a. (4 points) If the CPU issues the logical address 1111 which physical memory
location is the logical address 1111 is mapped to.
b. (4 points) Give an example of a logical address that will cause a page fault.
b. (5 points) Name one of the techniques that the Google File system uses to deal
with failures.
This page left intentionally blank