Choose the best threading-synchronization mechanism for each of the following situa- tions:
a) Halting thread execution until a particular event occurs.
b) Allowing access to a critical section only when some event occurs.
c) Restricting access to a critical section.
d) Allowing a set number of threads to access a critical section simultaneously.
a) Halting thread execution until a particular event occurs.
ANS: Events.
b) Allowing access to a critical section only when some event occurs.
ANS: Condition variables.
c) Restricting access to a critical section.
ANS: Locks.
d) Allowing a set number of threads to access a critical section simultaneously.
ANS: Semaphores.
You might also like to view...
Using a(n) ______ object, a Button’s Background can be set to _____.
a) SolidColorBrush, a color b) ImageBrush, an image c) VisualBrush, a video d) All of the above
What benefit is gained by placing the bottom of the stack at array index 0 when designing an array-based stack data type?
What will be an ideal response?
Under the PFF strategy, those pages that belong to a particular process and are currently in memory are referred to as the process’s ________.
a) “true” working set b) active page set c) running page set d) resident page set
Case-Based Critical Thinking QuestionsCase 1-1Alice was working on her company's Web site and had problems with inserting some images. Some of them were distorted; some were too big, so downloads took a long time. She asked her friend Sam for advice, checking in with him for answers to her questions.Where can Alice get images from?
A. digital cameras B. image editing software C. clip art Web sites D. all of the above