QUESTIONS AND CORRECT ANSWERS
Peterson's Solution is used to solve the problem of - CORRECT ANSWER process
synchronization
Windows uses the _____ multi-threading model. - CORRECT ANSWER one-to-one
Which of the following about a semaphore is wrong? - CORRECT ANSWER Two processes
should contain at most one common semaphore in order to prevent the interleaving execution of their
critical sections.
A mutex lock _____. - CORRECT ANSWER can be used to protect the critical section's
execution from being interleaved by other processes.
A solution to the critical section problem does NOT have to satisfy which of the following
requirements? - CORRECT ANSWER atomicity
If without deadlock, at most how many philosophers can eat simultaneously in the Dining
Philosophers problem with 5 philosophers? - CORRECT ANSWER 2
In the FCFS (First Come First Served) scheduling algorithm, which of the following describes the
phenomenon that when a process with a long CPU burst uses the CPU and short processes have to
wait? - CORRECT ANSWER convoy effect
Which of the following algorithms works the best for time-sharing systems? - CORRECT ANSWER
Round Robin (RR)
The process of context switch is performed by the _____. - CORRECT ANSWER dispatcher
Which of the following refers to the number of processes completed per time unit? - CORRECT
ANSWER Throughput
, In chapter 5 - Process Synchronization, what data structure is used in the Producer-Consumer
Problem? - CORRECT ANSWER circular array
Which of the following simulates the deadlock problem in computer systems? - CORRECT
ANSWER Dining-Philosophers problem
In the Producer-Consumer Problem, the variable "counter" records the number of items in the buffer.
The value of "counter" can be wrong when the Producer process executes "counter++" and the
Consumer process executes "counter--" at the same time, because _____. - CORRECT ANSWER
The executions of "counter++" in the Producer process and "counter--" in the Consumer
process interleave
A binary semaphore still has busy waiting. - CORRECT ANSWER True
In the Readers and Writers Problem, there is one mutex lock for process synchronization. -
CORRECT ANSWER False
Compared with context switching of processes, switching between threads has lower overhead. -
CORRECT ANSWER True
Multi-threaded applications have multiple threads within a single process. All threads share their
program counter, stack, set of registers, common code and data. - CORRECT ANSWER False,
Each thread has their own program counter, stack, and registers.
Multi-threaded applications only share common code and data.
Shortest-Job-First algorithm is non-preemptive. If we make it preemptive, we get the Shortest-
Remaining-Time-First algorithm. - CORRECT ANSWER True
In the Round Robin algorithm, smaller time quantum can cause higher overhead for context switches
in total. - CORRECT ANSWER True
A multi-threaded process can run on multiple processors but a single-threaded process can only run on
one processor even if there're many processors available. - CORRECT ANSWER True