Operating System Set 4 (30 mcqs)

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

2) A terminated transaction that has completed its execution successfully is ____________, otherwise it is __________.
a) committed, destroyed
b) aborted, destroyed
c) committed, aborted
d) None of these

3) The state of the data accessed by an aborted transaction must be restored to what it was just before the transaction started executing. This restoration is known as ________ of transaction.
a) safety
b) protection
c) roll – back
d) revert – back

4) Write ahead logging is a way :
a) to ensure atomicity
b) to keep data consistent
c) that records data on stable storage
d) All of these

5) In the write ahead logging a _____ is maintained.
a) a memory
b) a system
c) a disk
d) a log record

6) An actual update is not allowed to a data item :
a) before the corresponding log record is written out to stable storage
b) after the corresponding log record is written out to stable storage
c) until the whole log record has been checked for inconsistencies
d) All of these

7) The undo and redo operations must be _________ to guarantee correct behaviour, even if a failure occurs during recovery process.
a) idempotent
b) easy
c) protected
d) All of these

8) The system periodically performs checkpoints that consists of the following operation(s) :
a) Putting all the log records currently in main memory onto stable storage
b) putting all modified data residing in main memory onto stable storage
c) putting a log record onto stable storage
d) All of these

9) 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 : ( choose all that apply )
a) There is a need to perform an undo operation on T1
b) There is a need to perform a redo operation on T1
c) There is no need to perform an undo operation on T1
d) There is no need to perform a redo operation on T1

10) Serializable schedules are ones where :
a) concurrent execution of transactions is equivalent to the transactions executed serially
b) the transactions can be carried out one after the other
c) a valid result occurs after execution transactions
d) None of these

11) A deadlock can be broken by : (choose all that apply)
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) to preempt some resources from one or more of the deadlocked processes

12) The two ways of aborting processes and eliminating deadlocks are : (choose all that apply)
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 these

13) Those processes should be aborted on occurrence of a deadlock, the termination of which :
a) is more time consuming
b) incurs minimum cost
c) safety is not hampered
d) All of these

14) The process to be aborted is chosen on the basis of the following factors : (choose all that apply)
a) priority of the process
b) process is interactive or batch
c) how long the process has computed
d) how much more long before its completion

15) Cost factors of process termination include : (choose all that apply)
a) number of resources the deadlock process is holding
b) CPU utilization at the time of deadlock
c) amount of time a deadlocked process has thus far consumed during its execution
d) All of the above

16) If we preempt a resource from a process, the process cannot continue with its normal execution and it must be :
a) aborted
b) rolled back
c) terminated
d) queued

17) 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 these

18) If the resources are always preempted from the same process, __________ can occur.
a) deadlock
b) system crash
c) aging
d) starvation

19) The solution to starvation is :
a) the number of rollbacks must be included in the cost factor
b) the number of resources must be included in resource preemption
20) Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock ?
I) 2-phase locking
II) Time-stamp ordering
a) I only
b) II only
c) Both I and II
d) Neither I nor II

c) resource preemption be done instead
d) All of these

21) Earliest deadline first algorithm assigns priorities according to :
a) periods
b) deadlines
c) burst times
d) None of these

22) A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35. The total CPU utilization is :
a) 0.90
b) 0.74
c) 0.94
d) 0.80

23) In the above question, the priorities of P1 and P2 :
a) remain the same throughout
b) keep varying from time to time
c) None of these

24) In Question number 2, can the two processes be scheduled using the EDF algorithm without missing their respective deadlines ?
a) Yes
b) No
c) Maybe

25) Using EDF algorithm practically, it is impossible to achieve 100 percent utilization due to : (choose all that apply)
a) the cost of context switching
b) interrupt handling
c) power consumption
d) All of these

26) T shares of time are allocated among all processes out of N shares in __________ scheduling algorithm.
a) rate monotonic
b) proportional share
c) earliest deadline first
d) None of these

27) In UNIX, the abort() function sends the ________ signal to the calling process, causing abnormal termination.

28) In most cases, if a process is sent a signal while it is executing a system call :
a) the system call will continue execution and the signal will be ignored completely
b) the system call is interrupted by the signal, and the signal handler comes in
c) the signal has no effect until the system call completes
d) None of these

29) A process can never be sure that a signal it has sent ___________________.
a) has which identifier
b) has not been lost
c) has been sent
d) All of these

30) In UNIX, the _____ system call is used to send a signal.
a) sig
b) send
c) kill
d) sigsend

1-a 2-c 3-c 4-d 5-d
6-a 7-a 8-d 9-cd 10-a
11-a,d 12-a,c 13-b 14-a,b,c,d 15-a,c
16-b 17-b 18-d 19-b 20-a
21-b 22-c 23-b 24-a 25-a,b
26-b 27-d 28-c 29-b 30-c
Spread the love

Leave a Comment

Your email address will not be published. Required fields are marked *