OS6

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

A mutex lock is released immediately after entering a critical section. True False

False

CAS-based synchronization is always faster than traditional synchronization. True False

False

Mutex locks and counting semaphores are essentially the same thing. True False

False

The value of a counting semaphore can range only between 0 and 1. True False

False

When the mutex lock is implemented based on a binary semaphore, it should be initialized to be 0. True False

False

A semaphore has an integer value. True False

True

Bounded waiting implies progress, and progress implies mutual exclusion. True False

True

Mutex lock variable is binary. True False

True

Race conditions can result in corrupted values of shared data. True False

True

Semaphore implementation overcomes the busy waiting problem. True False

True

Semaphores and mutex locks both provide mutual exclusion. True False

True

Solutions to the critical section problem may suffer from liveness failures. True False

True

Spinlocks are not appropriate for single-processor systems. True False

True

The preemptive kernel is more suitable for real-time programming than non-preemptive kernel. True False

True

The preemptive kernel may be more responsive than non-preemptive kernel. True False

True

Which of the following is NOT true regarding semaphore implementation? a.) It suffers from the busy waiting problem b.) Semaphore has a waiting queue associated with the semaphore c.) When a process executes the wait() operation and finds that the semaphore value is not positive, it will suspend itself d.) A process that is suspended, waiting on the semaphore, should be restarted when some other process executes a signal() operation.

a.) It suffers from the busy waiting problem

Which of the following is NOT true? a.) Since semaphore and mutex lock are tools for synchronization, process that have used semaphores or mutex locks should not cause deadlocks b.) Semaphores and mutex locks may be shared resources that difference processes contend for, and hence deadlocks may occur c.) a set of processes is in a deadlocked state when every process in the set is waiting for an event that can be caused only by another process in the set d.) all of the above

a.) Since semaphore and mutex lock are tools for synchronization, process that have used semaphores or mutex locks should not cause deadlocks

In _________, the process requests permission to access and modify variables shared with others. a.) entry section b.) critical section c.) exit section d.) remainder section

a.) entry section

Which of the following regarding mutex lock is NOT true? a.) mutex lock is a hardware solution to critical-section problem b.) mutex lock is a higher-level software solution to critical-section problem c.) mutex lock suffers from busy waiting d.) the general rule of thumb is to use a mutex lock if the lock will be held for a duration less than two context switches

a.) mutex lock is a hardware solution to critical-section problem

Which of the following critical-section problem's requirements ensures only one process is active in its critical section at a time? a.) mutual exclusion b.) progress c.) bounded waiting d.) none of the above

a.) mutual exclusion

When mutex lock is implemented as a binary semaphore, what should its value be initialized to be? a.) 0 b.) 1 c.) -1 d.) none of the above

b.) 1

Which of the following is true for the solutions to critical-section problems? a.) No deadlock implies progress, and progress implies bounded waiting b.) Bounded waiting implies progress, and progress implies no deadlock c.) Progress implies no deadlock, and no deadlock implies bounded waiting d.) Bounded waiting implies no deadlock, and no deadlock implies progress

b.) Bounded waiting implies progress, and progress implies no deadlock

In _________, the process may be changing common variables, updating a table, writing a file, and so on. a.) entry section b.) critical section c.) exit section d.) remainder section

b.) critical section

Which of the following critical-section problem's requirements ensures programs will cooperatively determine what process will next enter its critical section? a.) mutual exclusion b.) progress c.) bounded waiting d.) none of the above

b.) progress

Which of the following is true? a.) No deadlock implies no starvation; b.) No starvation implies no deadlock; c.) Deadlock doesn't imply starvation; d.) Starvation implies deadlock.

c.) Deadlock doesn't imply starvation;

Which of the following statements is true? a.) A counting semaphore can never be used as a binary semaphore. b.) A binary semaphore can never be used as a counting semaphore. c.) Spinlocks can be used to prevent busy waiting in the implementation of semaphore. d.) Counting semaphores can be used to control access to a resource with a finite number of instances.

c.) Spinlocks can be used to prevent busy waiting in the implementation of semaphore.

Which of the following actions should be performed among cooperating processes? a.) process synchronization b.) coordination c.) both of the above d.) none of the above

c.) both of the above

Which of the following is true for race condition? a.) race condition occurs where several processes access and manipulate the same data concurrently b.) when race condition occurs, the outcome of the execution depends on the particular order in which the access takes place c.) both of the above d.) none of the above

c.) both of the above

Which of the following critical-section problem's requirements limits the amount of time a program will wait before it can enter its critical section? a.) mutual exclusion b.) progress c.) bounded waiting d.) none of the above

c.) bounded waiting

Which of the following is true regarding the requirements for the solutions to critical-section problem? a.) mutual exclusion implies progress b.) progress implies bounded waiting c.) bounded waiting implies progress d.) none of the above

c.) bounded waiting implies progress

Under which of the following contention loads does traditional synchronization become faster than CAS-based synchronization? a.) uncontended b.) moderate contention c.) high contention d.) none of the above

c.) high contention

The counting semaphore is initialized to ___________. a.) 0 b.) 1 c.) the number of resources available d.) none of the above

c.) the number of resources available

What is the correct order of operations for protecting a critical section using a binary semaphore? a.) release() followed by acquire() b.) acquire() followed by release() c.) wait() followed by signal() d.) signal() followed by wait()

c.) wait() followed by signal()

Which of the following are efforts to towards developing scalable, efficient tools that address the demands of concurrent programming? a.) designing compilers that generate more efficient code b.) developing languages that provide support for concurrent programming c.) improving the performance of existing libraries and APIs d.) all of the above

d.) all of the above

Which of the following may cause a liveness failure? a.) an infinite loop b.) a busy waiting loop c.) a deadlock d.) all of the above

d.) all of the above

Assume count is a variable name, which of the following operations is atomic? a.) count++ b.) count-- c.) both of the above d.) none of the above

d.) none of the above


Set pelajaran terkait

Personal Finance Final Exam Quizlet

View Set

Chapter 12: Gender, Sex & Sexuality Quiz & Terms

View Set

Chapter 30: Peripheral Vascular Disease

View Set

ASTR 1101 EXAM 1 HW Questions 1-4

View Set

Chapter 11 basics Texas statues and rules to LIFE INSURANCE ONLY

View Set

Chapter 14: Language and Communication (Connect Assignment)

View Set