0% found this document useful (0 votes)
18 views

pretest2

pretest2

Uploaded by

nthpro.4259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

pretest2

pretest2

Uploaded by

nthpro.4259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

A state is safe, if ____________

(a) the system does not crash due to deadlock occurrence


(b) the system can allocate resources to each process in some order and still avoid
a deadlock
(c) the state keeps the system protected and safe
(d) all of the mentionedRead more on Sarthaks.com -
https://www.sarthaks.com/2417139/a-state-is-safe-if

9. The resource allocation graph is not applicable to a resource allocation


system ____________
a) with multiple instances of each resource type
b) with a single instance of each resource type
c) single & multiple instances of each resource type
d) none of the mentioned

3. 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

8. Process synchronization can be done on __________


a) hardware level
b) software level
c) both hardware and software level
d) none of the mentioned

5. 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 the mentioned
11. The disadvantage of a process being allocated all its resources before
beginning its execution is ____________
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of the mentioned

4. The process to be aborted is chosen on the basis of the following factors?


a) priority of the process
b) process is interactive or batch
c) how long the process has computed
d) all of the mentioned
4. For a deadlock to arise, which of the following conditions must hold
simultaneously?
a) Mutual exclusion
b) No preemption
c) Hold and wait
d) All of the mentioned

2. When several processes access the same data concurrently and the outcome
of the execution depends on the particular order in which the access takes place
is called ________
a) dynamic condition
b) race condition
c) essential condition
d) critical condition

1. Which process can be affected by other processes executing in the


system?
a) cooperating process
b) child process
c) parent process
d) init process
5. A system is in a safe state only if there exists a ____________
a) safe allocation
b) safe resource
c) safe sequence
d) all of the mentioned
4. 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 the mentioned

1. A deadlock can be broken by ____________


a) abort one or more processes to break the circular wait
b) abort all the process in the system
c) preempt all resources from all processes
d) none of the mentioned
4. With _____________ only one process can execute at a time; meanwhile all
other process are waiting for the processor. With ______________ more than one
process can be running simultaneously each on a different processor.
a) Multiprocessing, Multiprogramming
b) Multiprogramming, Uniprocessing
c) Multiprogramming, Multiprocessing
d) Uniprogramming, Multiprocessing

6. In UNIX, the return value for the fork system call is _____ for the child process
and _____ for the parent process.
a) A Negative integer, Zero
b) Zero, A Negative integer
c) Zero, A nonzero integer
d) A nonzero integer, Zero

5. Which one of the following is the deadlock avoidance algorithm?


a) banker’s algorithm
b) round-robin algorithm
c) elevator algorithm
d) karn’s algorithm

12. The content of the matrix Need is ____________


a) Allocation – Available
b) Max – Available
c) Max – Allocation
d) Allocation – Max
3. Cascading termination refers to termination of all child processes if the parent
process terminates ______
a) Normally
b) Abnormally
c) Normally or abnormally
d) None of the mentioned

.A computer system has 6 tape drives, with ‘n’ processes competing for them. Each
process may need 3 tape drives. The maximum value of ‘n’ for which the system is
guaranteed to be deadlock free is?
Select one:

2. A system is in the safe state if ____________


a) the system can allocate resources to each process in some order and
still avoid a deadlock
b) there exist a safe sequence
c) all of the mentioned
d) none of the mentioned
7. Deadlock prevention is a set of methods ____________
a) to ensure that at least one of the necessary conditions cannot hold
b) to ensure that all of the necessary conditions do not hold
c) to decide if the requested resources for a process have to be given or not
d) to recover from a deadlock

7. Every time a request for allocation cannot be granted immediately, the


detection algorithm is invoked. This will help identify ____________
a) the set of processes that have been deadlocked
b) the set of processes in the deadlock queue
c) the specific process that caused the deadlock
d) all of the mentioned
8. For non sharable resources like a printer, mutual exclusion ____________
a) must exist
b) must not exist
c) may exist
d) none of the mentioned

3. A parent process calling _____ system call will be suspended until children
processes terminate.
a) wait
b) fork
c) exit
d) exec
8. In the bakery algorithm to solve the critical section problem ____________
a) each process is put into a queue and picked up in an ordered manner
b) each process receives a number (may or may not be unique) and the one
with the lowest number is served next
c) each process gets a unique number and the one with the highest number is
served next
d) each process gets a unique number and the one with the lowest number is
served next

2. The request and release of resources are ___________


a) command line statements
b) interrupts
c) system calls
d) special programs

8. The child process completes execution, but the parent keeps executing, then
the child process is known as __________
a) Orphan
b) Zombie
c) Body
d) Dead

7. To _______ to a safe state, the system needs to keep more information about
the states of processes.
a) abort the process
b) roll back the process
c) queue the process
d) none of the mentioned

3. The two ways of aborting processes and eliminating deadlocks are


____________
a) Abort all deadlocked processes
b) Abort all processes
c) Abort one process at a time until the deadlock cycle is eliminated
d) All of the mentioned
6. Mutual exclusion can be provided by the __________
a) mutex locks
b) binary semaphores
c) both mutex locks and binary semaphores
d) none of the mentioned

1. The number of resources requested by a process ____________


a) must always be less than the total number of resources available in the
system
b) must always be equal to the total number of resources available in the
system
c) must not exceed the total number of resources available in the system
d) must exceed the total number of resources available in the system
11. The data structures available in the Banker’s algorithm are ____________
a) Available
b) Need
c) Allocation
d) All of the mentioned

4. In UNIX, each process is identified by its __________


a) Process Control Block
b) Device Queue
c) Process Identifier
d) None of the mentioned
5. Which one of the following is a synchronization tool?
a) thread
b) pipe
c) semaphore
d) socket
2. 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
9. A monitor is a module that encapsulates __________
a) shared data structures
b) procedures that operate on shared data structure
c) synchronization between concurrent procedure invocation
d) all of the mentioned

4. The circular wait condition can be prevented by ____________


a) defining a linear ordering of resource types
b) using thread
c) using pipes
d) all of the mentioned
2. Given a priori information about the ________ number of resources of each
type that maybe requested for each process, it is possible to construct an
algorithm that ensures that the system will never enter a deadlock state.
a) minimum
b) average
c) maximum
d) approximate
1. Restricting the child process to a subset of the parent’s resources prevents
any process from __________
a) overloading the system by using a lot of secondary storage
b) under-loading the system by very less CPU utilization
c) overloading the system by creating a lot of sub-processes
d) crashing the system by utilizing multiple resources
2. 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 the mentioned
7. The wait operation of the semaphore basically works on the basic _______
system call.
a) stop()
b) block()
c) hold()
d) wait()
7. The child process can __________
a) be a duplicate of the parent process
b) never be a duplicate of the parent process
c) cannot have another program loaded into it
d) never have another program loaded into it
8. If no cycle exists in the resource allocation graph ____________
a) then the system will not be in a safe state
b) then the system will be in a safe state
c) all of the mentioned
d) none of the mentioned
5. What is the disadvantage of invoking the detection algorithm for every
request?
a) overhead of the detection algorithm due to consumption of memory
b) excessive time consumed in the request to be allocated memory
c) considerable overhead in computation time
d) all of the mentioned
6. What is the drawback of banker’s algorithm?
a) in advance processes rarely know how much resource they will need
b) the number of processes changes as time progresses
c) resource once available can disappear
d) all of the mentioned
9. For sharable resources, mutual exclusion ____________
a) is required
b) is not required
c) may be or may not be required
d) none of the mentioned
6. All unsafe states are ____________
a) deadlocks
b) not deadlocks
c) fatal
d) none of the mentioned

6. For a Hold and wait condition to prevail ____________


a) A process must be not be holding a resource, but waiting for one to be
freed, and then request to acquire it
b) A process must be holding at least one resource and waiting to acquire
additional resources that are being held by other processes
c) A process must hold at least one resource and not be waiting to acquire
additional resources
d) None of the mentioned
2. An edge from process Pi to Pj in a wait for graph indicates that
____________
a) Pi is waiting for Pj to release a resource that Pi needs
b) Pj is waiting for Pi to release a resource that Pj needs
c) Pi is waiting for Pj to leave the system
d) Pj is waiting for Pi to leave the system

You might also like