Font size
WorksheetsOS CLASS-TEST 3
Total questions: 60
Worksheet time: 2hrs 0mins
The state of the process when it is finished or done executing.
blocked
waiting
running
terminated
This terminates a process when an error is encountered in an I/O device.
Invalid instruction
Time overrun
I/O failure
Arithmetic error
A process that is assigned to call a 'create process system call' is an example of __________.
user process
background process
system process
foreground process
What is the ready state of a process?
when process is scheduled to run after some execution
when process is unable to run until some task has been completed
when process is using the CPU
none of the mentioned
Which system call returns the process identifier of a terminated child?
fork()
wait()
exit()
atexit()
A Process Control Block (PCB) does not contain which of the following?
heap
stack
text
bootstrap
The state of a process is defined by __________
the final activity of the process
the activity just executed by the process
the activity to next be executed by the process
the current activity of the process
Which of the following is not the state of a process?
New
Old
Waiting
Running
The entry of all the PCBs of the current processes is in __________
Process Register
Program Counter
Process Table
Process Unit
The processes that are
residing in main memory and are ready and waiting to execute are kept on a
list called _____________
job queue
ready queue
execution queue
process queue
The interval from the time of submission of a process to the time of completion is termed as ____________
waiting time
turnaround time
response time
throughput
Which scheduling algorithm allocates the CPU first to the process that requests the CPU first?
first-come, first-served scheduling
shortest job scheduling
priority scheduling
round robin scheduling
In priority scheduling algorithm ____________
CPU is allocated to the process with highest priority
CPU is allocated to the process with lowest priority
Equal priority processes cannot be scheduled
None of the mentioned
The processes which are blocked due to unavailability of an I/O device constitute this queue.
ready queue
job queue
process scheduling queue
device queue
------- is a condition of process waiting for longer duration resulting either resource allocated or non allocated is called as
starvation
deadlock
race condition
none of them
Which module gives control of the CPU to the process selected by the short-term scheduler?
dispatcher
interrupt
scheduler
NONE
The processes that are residing in main memory and are ready and waiting to execute are kept on a list called
job queue
READY queue
EXECUTE queue
DEVICE queue
The interval from the time of submission of a process to the time of completion is termed as
waiting time
turnaround time
response time
throughput
Which algorithm is defined in Time quantum?
shortest job scheduling algorithm
round robin scheduling algorithm
priority scheduling algorithm
multilevel queue scheduling algorithm
Process are classified into different groups in ____________
shortest job scheduling algorithm
round robin scheduling algorithm
priority scheduling algorithm
multilevel queue scheduling algorithm
In multilevel feedback scheduling algorithm ____________
a process can move to a different classified ready queue
classification of ready queue is permanent
processes are not classified into groups
NONE
the process is swapped out of memory and later swapped into memory is done by
short term
medium term
long term
none
switching a process stores state into PCB and restore a state of different process is called as
Dispatching
context switching
demand paging
page fault
The problem with round robin, SJF and STR is what?
They don't take into account priority
They all take too long
Short jobs will not be completed
Which of these is NOT an aim of the CPU scheduler
To maximise CPU time
Process as many jobs as possible
To complete jobs in at least 30 seconds
Which of these is a benefit of FCFS
Simple to implement
It considers priority
Long jobs will get completed eventually
Which algorithm is being described.."Long jobs might never get completed as short processes will always ‘jump the queue"
Round robin
FCFS
STR
If a CPU has the following:
Process A = 3 cycles
Process B = 2 cycles
Process C = 5 cycles
Which would implement 'A' the quickest?
Round robin (2 cycles per timeslice)
FCFS
SJF(PREEMPTIVE)
SJF
A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is
6
7
8
9
Which of the following is not a necessary condition for deadlock?
Mutual Exclusion
Reentrancy
Hold and wait
No pre-emption
In which of the following four necessary conditions for deadlock processes claim exclusive control of the resources they require?
no preemption
mutual exclusion
circular wait
hold and wait
A total of 9 units of a resource type available, and given the safe state shown below, which of the following sequence will be a safe state?
Process Used Max
A 2 7
B 1 6
C 2 5
D 1 4
(P4, P1, P3, P2)
(P4, P2, P1, P3)
(P4, P2, P3, P1)
(P3, P1, P2, P4)
Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is _______ .
1
2
3
4
Which of the following is NOT a valid deadlock prevention scheme?
Release all resources before requesting a new resource
Number the resources uniquely and never request a lower numbered resource than the last one requested
Never request a resource after releasing any resource
Request and all required resources be allocated before execution.
At a particular time of computation, the value of a counting semaphore is 10. Then 12 P operations and “x” V operations were performed on this semaphore. If the final value of semaphore is 7, x will be:
8
9
10
11
On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?
5, 12, 9, 18
5, 9, 12, 18
12, 18, 9, 5
9, 12, 18, 5
What is the name of the technique in which the operating system of a computer executes several programs concurrently by switching back and forth between them?
Partitioning
Multi-tasking
Windowing
Paging
A system is in the safe state if ____________
the system can allocate resources to each process in some order and still avoid a deadlock
there exist a safe sequence
all of the mentioned
none of the mentioned
Which one of the following is the deadlock avoidance algorithm?
banker’s algorithm
round-robin algorithm
elevator algorithm
karn’s algorithm
A problem encountered in multitasking when a process is perpetually denied necessary resources is called ____________
deadlock
starvation
inversion
aging
Which one of the following is a visual ( mathematical ) way to determine the deadlock occurrence?
resource allocation graph
starvation graph
inversion graph
none of the mentioned
For Mutual exclusion to prevail in the system :
at least one resource must be held in a non sharable mode
the processor must be a uniprocessor rather than a multiprocessor
there must be at least one resource in a sharable mode
All of these
Deadlock prevention is a set of methods :
to ensure that at least one of the necessary conditions cannot hold
to ensure that all of the necessary conditions do not hold
to decide if the requested resources for a process have to be given or not
to recover from a deadlock
To ensure that the hold and wait condition never occurs in the system, it must be ensured that :
whenever a resource is requested by a process, it is not holding any other resources
each process must request and be allocated all its resources before it begins its execution
a process can request resources only when it has none
All of these
A process said to be in ___________ state if it was waiting for an event that will never occur.
Safe
Unsafe
Starvation
Deadlock
A set of resources' allocations such that the system can allocate resources to each process in some order, and still avoid a deadlock is called ________.
Unsafe state
Safe state
Starvation
Greedy Allocation
Situations where two or more processes are reading or writing some shared data and the final results depends on the order of usage of the shared data, are called ________.
Race conditions
Critical section
Mutual exclusion
Dead locks
The state of a process after it encounters an I/O instruction is __________.
Ready
Blocked/Waiting
Idle
Running
The Banker's algorithm is used
to avoid deadlock in operating systems
to detect deadlock in operating systems
to prevent a deadlocked state
none of the above
Which of the following is the drawback of the One to One Model?
decreased concurrency provided by this model
creating a user thread requires creating the corresponding kernel thread
creating so many threads at once can crash the system
increased concurrency provided by this model
The time required to create a new thread in an existing process is _____
equal to the time required to create a new process
greater than the time required to create a new process
less than the time required to create a new process
none of the mentioned
Which of the following conditions must be satisfied to solve the critical section problem?
Mutual Exclusion
Progress
critical section
Bounded Waiting
Which of the following is advantages about thread?
kernel is single threaded
Threads minimize the context switching time
Use of threads provides concurrency within a process
doesn't affect the concurrency
The register context and stacks of a thread are deallocated when the thread?
blocks
terminates
spawns
unblocks
Which one of the following is not a valid state of a thread?
parsing
running
ready
blocked
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
The bounded buffer problem is also known as (a)
