With 3 initially empty frames, how many page faults does FIFO page replacement cause for the reference string 2, 4, 1, 4, 3, 2, 5, 4, 1, 2?
Correct answer B. 9
Subject / 929 questions
Page 19 of Programming multiple-choice questions with answers. Tap an option to check yourself.
Page 19 of 47
Correct answer B. 9
Correct answer B. A waiting thread wastes CPU cycles by looping until the lock becomes free
Correct answer D. 1
Correct answer D. mutex = 1, empty = n, full = 0
Correct answer A. A mutex has an owner and should be released only by the thread that locked it, while a semaphore can be signalled by any thread
Correct answer D. Only one process can be active inside the monitor at a time
Correct answer D. Deadlock, because each waits forever for the right chopstick
Correct answer B. Writers
Correct answer C. Priority inversion
Correct answer A. Returns the old value of a memory word and sets it to true as one indivisible operation
Correct answer C. Preemption of resources
Correct answer B. A deadlock definitely exists
Correct answer B. Aging, which gradually raises the priority of processes that wait a long time
Correct answer D. It behaves the same as FCFS
Correct answer B. It is moved down to a lower-priority queue
Correct answer D. Only when the running process terminates or switches to the waiting state
Correct answer C. A race condition
Correct answer A. Mutual exclusion, progress and bounded waiting
Correct answer C. A boolean array flag[2] and an integer turn
Correct answer C. A thread shares its process's address space and resources, so far less must be allocated