Font size
WorksheetsOS Quiz 2 LH18
Total questions: 45
Worksheet time: 30mins
What is the graph used for deadlock identification
resource allocation graph
process allocation graph
thread allocation graph
instance allocation graph
Which of the following condition is required for deadlock to be possible?
mutual exclusion
a process may hold allocated resources while awaiting assignment of other resources
no resource can be forcibly removed from a process holding it
all of the mentioned
Which of the following is not a necessary condition for deadlock?
Mutual Exclusion
Reentrancy
Hold and wait
No pre-emption
If any of the process is waiting for a long time then it is called as
Deadlock
semaphore
starvation
None
If there is an edge from resource to process then we called that edge as
assignment edge
request edge
forward edge
back edge
If there is an edge from process to resource then we called that edge as
assignment edge
request edge
back edge
front edge
A set of process or thread waits for a resource which is held by another waiting process is called
Deadlock
starvation
synchronization
concurrency
Which Scheduling algorithm allocates the
CPU first to the process that requests CPU first?
First Come First serve scheduling
shortest job scheduling
priority scheduling
none of the mentioned
CPU scheduling is the basis of ___________
multiprocessor systems
multiprogramming operating systems
larger memory sized systems
none of the mentioned
consider the 3 processes, P1, P2 and P3 shown in the table
The completion order of the 3 processes under the policies FCFS and RRS (round robin scheduling with CPU quantum of 2 time units) are
FCFS: P1, P2, P3 RR2: P1, P2, P3
FCFS: P1, P3, P2 RR2: P1, P3, P2
FCFS: P1, P2, P3 RR2: P1, P3, P2
FCFS: P1, P3, P2 RR2: P1, P2, P3
Which of the following statements are true? (GATE CS 2010)
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
I only
I and III only
II and III only
I, II and III
Consider the following statements about process state transitions for a system using preemptive scheduling.
I. A running process can move to ready state.
II. A ready process can move to ready state.
III. A blocked process can move to running state.
IV. A blocked process can move to ready state.
I, II AND III ONLY
II AND III ONLY
I, II AND IV ONLY
I, II, III AND IV ONLY
A solution to the Dining Philosophers Problem which avoids deadlock is GATE1998
ensure that all philosophers pick up the left fork before the right fork
ensure that all philosophers pick up the right fork before the left fork
ensure that one particular philosopher picks up the left fork before the right fork, and that all other philosophers pick up the right fork before the left fork
None of the above
What do device drivers do?
Allows the OS to communicate with hardware
Drives around the motherboard
Increases the amount of storage
Which of the following is not an example of an OS for Smart phone?
UNIX
IOS
Windows Phone 7
Android
Which of the following schedules threads?
Virtual Memory
Operating system
CPU
Input
_____ is not a OS services
Accounting
error detection
system call
I/O operations
which of the following types of OS is non-interactive?
Multitasking OS
Multi-user OS
Batch OS
Multiprogramming OS
When we execute a C program, CPU runs in ____ mode.
user
kernel
supervisory
system
A Process waiting to be assigned to a processor is considered to be in _____ state
waiting
ready
terminated
running
A process can be ___________
single threaded
multithreaded
both single threaded and multithreaded
none of the mentioned
A PCB also known as
Task controlling block
memory controlling block
I/O controlling block
device controlling block
The time required to create a new thread in an existing process is ___________
greater than the time required to create a new process
less than the time required to create a new process
equal to the time required to create a new process
none of the mentioned
Many to one model of threads
map many user level threads to one kernel level threads
map one user level threads to one kernel level threads
map many kernel level threads to one use level threads
All of these
starvation means
Deadlock
indefinite blocking of process
Termination of processes
creation of processes
Type your Full Name
Enter your Registration Number
Type your Lecture Hall (LH11/LH18)
A
B
C
D
I, II, III
II, III, IV
I, III, IV
I, II, IV
A
B
C
D
•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 the mentioned
•A critical region is
•A. One which is enclosed by a pair of P and V operations on semaphores.
•B. A program segment that has not been proved bug-free.
•
C. A program segment that often causes unexpected system crashes.
•D. A program segment where shared resources are accessed
•Current value of Semaphore S is 10, then after we perform 6P operations and 7V operations in the sequence? What will be the final value?
11
12
9
23
•The bounded buffer problem is also known as
•
a. Readers – Writers problem
•b. Dining – Philosophers problem
•c. Producer – Consumer problem
d. None of the mentioned
•To ensure difficulties do not arise in the readers – writers problem, _______ are given exclusive access to the shared object.
•a. readers
•b. writers
•c. readers and writers
d. none of the mentioned
•Name of classical synchronization problem that involves the allocation of limited resources amongst a group of processes in a deadlock free and starvation free manner
•A. Readers – Writers problem
•b. Dining – Philosophers problem
•c. Producer – Consumer problem
d. None of the mentioned
What are the two kinds of semaphores?
mutex & counting
binary & counting
counting & decimal
decimal & binary
