Concurrency Complete Test Bank Ch5 - Operating Systems Internals 9th Global Edition | Test Bank with Key by Stallings by William Stallings. DOCX document preview.
Chapter 5 – Concurrency:
Mutual Exclusion And Synchronization
TRUE/FALSE QUESTIONS:
T F 1) The central themes of operating system design are all concerned with the
management of processes and threads.
T F 2) It is possible in a single-processor system to not only interleave the execution
of multiple processes but also to overlap them.
T F 3) As an extension of the principles of modular design and structured
programming, some applications can be effectively programmed as a set of concurrent processes.
T F 4) Race condition is a situation in which two or more processes continuously
change their states in response to changes in the other process(es) without doing any useful work.
T F 5) The sharing of main memory among processes is useful to permit efficient
and close interaction among processes because such sharing does not lead to any problems.
T F 6) When processes cooperate by communication, the various processes
participate in a common effort that links all of the processes.
T F 7) Atomicity guarantees isolation from concurrent processes.
T F 8) Concurrent processes do not come into conflict with each other when they are
competing for the use of the same resource.
T F 9) Two or more processes can cooperate by means of simple signals, such that a
process can be forced to stop at a specified place until it has received a specific
signal.
T F 10) The functioning of a process, and the output it produces, must be
independent of the speed at which its execution is carried out relative to the
speed of other concurrent processes.
T F 11) A process that is waiting for access to a critical section does not consume
processor time.
T F 12) The case of cooperation by sharing covers processes that interact with other
processes without being explicitly aware of them.
T F 13) It is possible for one process to lock the mutex and for another process to
unlock it.
T F 14) One of the most common problems faced in concurrent processing is the
producer/consumer problem.
T F 15) Processes need to be synchronized to enforce mutual exclusion.
MULTIPLE CHOICE QUESTIONS:
1) The management of multiple processes within a uniprocessor system is __________ .
A) multiprogramming B) structured applications
C) distributed processing D) multiprocessing
2) A situation in which a runnable process is overlooked indefinitely by the scheduler,
although it is able to proceed, is _________ .
A) mutual exclusion B) deadlock
C) starvation D) livelock
3) The requirement that when one process is in a critical section that accesses shared resources,
no other process may be in a critical section that accesses any of those shared resources is ________ .
A) critical section B) livelock
C) mutual exclusion D) atomic operation
4) A means for two processes to exchange information is with the use of _________ .
A) spinlocks B) event flags
C) condition variables D) messages
5) A semaphore that does not specify the order in which processes are removed from
the queue is a ________ semaphore.
A) weak B) general
C) strong D) binary
6) A ________ occurs when multiple processes or threads read and write data items so
that the final result depends on the order of execution of instructions in the multiple
processes.
A) atomic operation B) race condition
C) livelock D) deadlock
7) A _________ is an integer value used for signaling among processes.
A) semaphore B) message
C) mutex D) atomic operation
8) ________ is when the sequence of instruction is guaranteed to execute as a group,
or not execute at all, having no visible effect on system state.
A) Critical section B) Mutual exclusion
C) Atomic operation D) Starvation
9) ________ are memory words used as a synchronization mechanism.
A) Semaphores B) Event flags
C) Counting semaphores D) Mailboxes
10) The term _______ refers to a technique in which a process can do nothing
until it gets permission to enter its critical section but continues to execute an
instruction or set of instructions that tests the appropriate variable to gain entrance.
A) spin waiting B) general semaphore
C) critical resource D) message passing
11) A _______ is a data type that is used to block a process or thread until a particular
condition is true.
A) deadlock B) general semaphore
C) condition variable D) mutex
12) A semaphore whose definition includes the policy that the process that has been
blocked the longest is released from the queue first is called a _________ semaphore.
A) general B) strong
C) weak D) counting
13) The ________ is a programming language construct that provides equivalent functionality
to that of semaphores and is easier to control.
A) atomic operation B) coroutine
C) critical section D) monitor
14) Probably the most useful combination, ________ allows a process to send one or more
messages to a variety of destinations as quickly as possible.
- blocking send, blocking receive
- nonblocking send, blocking receive
- nonblocking send, nonblocking receive
- blocking send, nonblocking receive
15) A ________ relationship allows multiple server processes to provide concurrent service
to multiple clients.
A) many-to-many B) one-to-many
C) many-to-one D) one-to-one
SHORT ANSWER QUESTIONS:
- ________ arises in three different contexts: multiple applications, structured applications, and operating system structure.
- ________ was invented to allow processing time to be dynamically shared among a number of active applications.
- A situation in which two or more processes are unable to proceed because each is waiting for one of the others to do something is a ________ .
- In the case of competing processes three control problems must be faced: mutual exclusion, deadlock, and ________ .
- A _______ is a semaphore that takes on only the values of 0 and 1.
- A situation in which multiple threads or processes read and write a shared data item and the final result depends on the relative timing of their execution is a ________ .
- ________ is a function or action implemented as a sequence of one or more instructions that appears to be indivisible, no other process can see an intermediate state or interrupt the operations.
- A ________ is a programming language construct that encapsulates variables, access procedures, and initialization code within an abstract data type.
- ________ is a section of code within a process that requires access to shared resources and that must not be executed while another process is in a corresponding section of code.
- In the case of _______ , processes are sharing resources without being aware of the other processes.
- A ________ is a mutual exclusion mechanism in which a process executes in an infinite loop waiting for the value of a lock variable to indicate availability.
- Only three operations may be performed on a semaphore: initialize, increment, and ________ .
- A monitor supports synchronization by the use of _______ that are contained within the monitor and accessible only within the monitor.
- In the case of _______ , messages are not sent directly from sender to receiver but rather are sent to a shared data structure consisting of queues that can temporarily hold messages.
- The classic concurrency problem that involves multiple readers that can read from a shared data area when no single writer is exclusively writing to it is the _______ Problem.
Document Information
Connected Book
Operating Systems Internals 9th Global Edition | Test Bank with Key by Stallings
By William Stallings