Skip to content
MCQtimes.com
GK
Pakistan Studies
Current Affairs
Islamic Studies
English
MCQtimes.com
Toggle Menu
OS Process Synchronization
Home
/
Computer Science
/
Operating System
/
OS Process Synchronization
- Page 4
Show/Hide Answers
OS Process Synchronization
A monitor is characterized by ____________
a set of programmer defined operators
an identifier
the number of variables in it
all of the mentioned
Author:
rikazzz
Comment
OS Process Synchronization
What is a semaphore?
is a binary mutex
must be accessed from only one process
can be accessed from multiple processes
none of the mentioned
Author:
rikazzz
Comment
OS Process Synchronization
What is the main disadvantage of spinlocks?
they are not sufficient for many process
they require busy waiting
they are unreliable sometimes
they are too complex for programmers
Author:
rikazzz
Comment
OS Process Synchronization
What are the two kinds of semaphores?
mutex & counting
binary & counting
counting & decimal
decimal & binary
Author:
rikazzz
Comment
OS Process Synchronization
The segment of code in which the process may change common variables, update tables, write into files is known as ____________
program
critical section
non – critical section
synchronizing
Author:
rikazzz
Comment
OS Process Synchronization
Consider a transaction T1 that committed prior to checkpoint. The
record appears in the log before the
record. Any modifications made by T1 must have been written to the stable storage either with the checkpoint or prior to it. Thus at recovery time ____________
There is a need to perform an undo operation on T1
There is a need to perform a redo operation on T1
There is no need to perform an undo and redo operation on T1
All of the mentioned
Author:
rikazzz
Comment
OS Process Synchronization
mutex);
a deadlock will occur
processes will starve to enter critical section
several processes maybe executing in their critical section
all of the mentioned
Author:
rikazzz
Comment
OS Process Synchronization
A deadlock free solution to the dining philosophers problem ____________
necessarily eliminates the possibility of starvation
does not necessarily eliminate the possibility of starvation
eliminates any possibility of any kind of problem further
none of the mentioned
Author:
rikazzz
Comment
OS Process Synchronization
for P10 is identical except that it uses V(mutex) instead of P(mutex). What is the largest number of processes that can be inside the critical section at any moment (the mutex being initialized to 1)?
1
2
3
None of the mentioned
Any one of the 9 processes can get into critical section after executing P(mutex) which decrements the mutex value to 0. At this time P10 can enter critical section by incrementing the value to 1. Now any of the 9 processes can enter the critical section by again decrementing the mutex value to 0. None of the remaining processes can get into their critical sections.
Author:
rikazzz
Comment
OS Process Synchronization
how many different values of X are possible after both processes finish executing?
one
two
three
four
The semaphore T ensures that all the statements from A finish execution before B begins. So now there is only one way in which statements from A and B can be interleaved: A1 A2 B1 B2: X = 11.
Author:
rikazzz
Comment
Page navigation
Previous Page
Previous
1
2
3
4
5
6
Next Page
Next
Go to Page
Light
Dark
GK
Pakistan Studies
Current Affairs
Islamic Studies
English