chapter 5: process synchronization quiz

Ace your homework & exams now with Quizwiz!

The wait operation of the semaphore basically works on the basic _______ system call. a) stop() b) block() c) hold() d) wait()

b

The code that changes the value of the semaphore is : a) remainder section code b) non - critical section code c) critical section code d) None of these

c

A collection of instructions that performs a single logical function is called : a) transaction b) operation c) function d) All of these

a

A monitor is characterized by : a) a set of programmer defined operators b) an identifier c) the number of variables in it d) All of these

a

A minimum of _____ variable(s) is/are required to be shared between processes to solve the critical section problem. a) one b) two c) three d) four

b

A mutex : a) is a binary mutex b) must be accessed from only one process c) can be accessed from multiple processes d) None of these

b

A situation where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called : a) data consistency b) race condition c) aging d) starvation

b

An un-interruptible unit is known as : a) single b) atomic c) static d) None of these

b

In the bounded buffer problem : a) there is only one buffer b) there are n buffers ( n being greater than one but finite) c) there are infinite buffers d) the buffer size is bounded

b

Semaphores are mostly used to implement : a) System calls b) IPC mechanisms c) System protection d) None of these

b

Spinlocks are intended to provide __________ only. a) Mutual Exclusion b) Bounded Waiting c) Aging d) Progress

b

The main disadvantage of spinlocks is that : a) they are not sufficient for many process b) they require busy waiting c) they are unreliable sometimes d) they are too complex for programmers

b

The segment of code in which the process may change common variables, update tables, write into files is known as : a) program b) critical section c) non - critical section d) synchronizing

b

The signal operation of the semaphore basically works on the basic _______ system call. a) continue() b) wakeup() c) getup() d) start()

b

Bounded waiting implies that there exists a bound on the number of times a process is allowed to enter its critical section : a) after a process has made a request to enter its critical section and before the request is granted b) when another process is in its critical section c) before a process has made a request to enter its critical section d) None of these

a

If the semaphore value is negative : a) its magnitude is the number of processes waiting on that semaphore b) it is invalid c) no operation can be further performed on it until the signal operation is performed on it d) None of these

a

The two atomic operations permissible on semaphores are : a) wait b) stop c) hold d) signal

a, d

A deadlock free solution to the dining philosophers problem : a) necessarily eliminates the possibility of starvation b) does not necessarily eliminate the possibility of starvation c) eliminates any possibility of any kind of problem further d) None of these

b

The following conditions must be satisfied to solve the critical section problem: a) Aging b) Mutual Exclusion c) Deadlock d) Progress e) Bounded Waiting

b,d,e

A monitor is a type of : a) semaphore b) low level synchronization construct c) high level synchronization construct d) None of these

c

A semaphore : a) is a binary mutex b) must be accessed from only one process c) can be accessed from multiple processes d) None of these

c

If no process is suspended, the signal operation : a) puts the system into a deadlock state b) suspends some default process' execution c) nothing happens d) the output is unpredictable

c

Semaphore is a/an _______ to solve the critical section problem. a) hardware for a system b) special program for a system c) integer variable d) None of these

c

The TestAndSet instruction is executed : a) after a particular process b) periodically c) atomically d) None of these

c

The bounded buffer problem is also known as : a) Readers - Writers problem b) Dining - Philosophers problem c) Producer - Consumer problem d) None of these

c

A procedure defined within a ________ can access only those variables declared locally within the _______ and its formal parameters. a) process, semaphore b) process, monitor c) semaphore, semaphore d) monitor, monitor

d

Spinlocks are : a) CPU cycles wasting locks over critical sections of programs b) locks that avoid time wastage in context switches c) locks that work better on multiprocessor systems d) All of these

d

In the bounded buffer problem, there are the empty and full semaphores that : a) count the number of empty and full buffers b) count the number of empty and full memory spaces c) count the number of empty and full queues d) None of these

a

Mutual exclusion implies that : a) if a process is executing in its critical section, then no other process must be executing in their critical sections b) if a process is executing in its critical section, then other processes must be executing in their critical sections c) if a process is executing in its critical section, then all the resources of the system must be blocked until it finishes execution d) None of these

a

The dining - philosophers problem will occur in case of : a) 5 philosophers and 5 chopsticks b) 4 philosophers and 5 chopsticks c) 3 philosophers and 5 chopsticks d) 6 philosophers and 5 chopsticks

a

The monitor construct ensures that : a) only one process can be active at a time within the monitor b) n number of processes can be active at a time within the monitor (n being greater than 1) c) the queue has only one process in it at a time d) All of these

a

The process invoking the wait operation is : a) suspended until another process invokes the signal operation b) waiting for another process to complete before it can itself call the signal operation c) stopped until the next process in the queue finishes execution d) None of these

a

The operations that can be invoked on a condition variable are : a) wait b) hold c) signal d) continue

a,c

To ensure difficulties do not arise in the readers - writers problem, _______ are given exclusive access to the shared object. a) readers b) writers c) None of these

b

What will happen if a non-recursive mutex is locked more than once ? a) Starvation b) Deadlock c) Aging d) Signaling

b

The two kinds of semaphores are : (choose two) a) mutex b) binary c) counting d) decimal

b,c


Related study sets

PCAT - General Chemistry Problems [XI-XII]

View Set

Small Business Management Exam Review 1

View Set

Writing and graphing Equations in Two Variables

View Set

Past Perfect and Past Perfect Continuous

View Set

Cultural Anthropology (1), Cultural Anthropology Midterm (1), Chapter 2 - Cultural Anthropology (1), ALL Quizes Anthropology (1) large

View Set

Chapter 2- Emerging Trends in HR

View Set

Finance Exam 2 Connect questions

View Set

Ch 4 Respiratory disorders/pediatric success nclex ?s/ex2

View Set