Operating System MCQ Number 01273

Operating System MCQ Set 1

1. A collection of instructions that performs a single logical function is called :
a) transaction
b) operation
c) function
d) all of the mentioned

Answer

Answer: a [Reason:] None.

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 the mentioned

Answer

Answer: c [Reason:] None.

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

Answer

Answer: c [Reason:] None.

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 the mentioned

Answer

Answer: d [Reason:] None.

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

Answer

Answer: d [Reason:] None.

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 the mentioned

Answer

Answer: a [Reason:] None.

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 the mentioned

Answer

Answer: a [Reason:] Idempotent – Multiple executions of an operation have the same result as does one execution.

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 the mentioned

Answer

Answer: d [Reason:] None.

9. Consider a transaction T1 that committed prior to checkpoint. The <T1 commits> record appears in the log before the <checkpoint> 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:
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 and redo operation on T1
d) All of the mentioned

Answer

Answer: c [Reason:] None.

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 the mentioned

Answer

Answer: a [Reason:] None.

11. A locking protocol is one that :
a) governs how locks are acquired
b) governs how locks are released
c) governs how locks are acquired and released
d) none of the mentioned

Answer

Answer: c [Reason:] None.

12. The two phase locking protocol consists of :
a) growing & shrinking phase
b) shrinking & creation phase
c) creation & growing phase
d) destruction & creation phase

Answer

Answer: a [Reason:] None.

13. The growing phase is a phase in which :
a) A transaction may obtain locks, but does not release any
b) A transaction may obtain locks, and releases a few or all of them
c) A transaction may release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks

Answer

Answer: a [Reason:] None.

14. The shrinking phase is a phase in which :
a) A transaction may obtain locks, but does not release any
b) A transaction may obtain locks, and releases a few or all of them
c) A transaction may release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks

Answer

Answer: c [Reason:] None.

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

Answer

Answer: b [Reason:] None.

Operating System MCQ Set 2

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

Answer

Answer: c [Reason:] None.

2. In the bounded buffer problem, there are the empty and full semaphores that :
a) count the number of empty and full buffers
b) count the number of empty and full memory spaces
c) count the number of empty and full queues
d) none of the mentioned

Answer

Answer: a [Reason:] None.

3. In the bounded buffer problem :
a) there is only one buffer
b) there are n buffers ( n being greater than one but finite)
c) there are infinite buffers
d) the buffer size is bounded

Answer

Answer: b [Reason:] None.

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

Answer

Answer: b [Reason:] None.

5. The dining – philosophers problem will occur in case of :
a) 5 philosophers and 5 chopsticks
b) 4 philosophers and 5 chopsticks
c) 3 philosophers and 5 chopsticks
d) 6 philosophers and 5 chopsticks

Answer

Answer: a [Reason:] None.

6. A deadlock free solution to the dining philosophers problem :
a) necessarily eliminates the possibility of starvation
b) does not necessarily eliminate the possibility of starvation
c) eliminates any possibility of any kind of problem further
d) none of the mentioned

Answer

Answer: b [Reason:] None.

7. All processes share a semaphore variable mutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward.
Suppose a process executes in the following manner :

signal(mutex);
.....
critical section
.....
wait(mutex);

In this situation :
a) a deadlock will occur
b) processes will starve to enter critical section
c) several processes maybe executing in their critical section
d) all of the mentioned

Answer

Answer: c [Reason:] None.

8. All processes share a semaphore variable mutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward.
Suppose a process executes in the following manner :

wait(mutex);
.....
critical section
.....
wait(mutex);

a) a deadlock will occur
b) processes will starve to enter critical section
c) several processes maybe executing in their critical section
d) all of the mentioned

Answer

Answer: a [Reason:] None.

9. Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned. (GATE 2010)

Method used by P1 :
while(S1==S2);
Critical section
S1 = S2;
 
Method used by P2 :
while(S1!=S2);
Critical section
S2 = not(S1);

Which of the following statements describes properties achieved ?
a) Mutual exclusion but not progress
b) Progress but not mutual exclusion
c) Neither mutual exclusion nor progress
d) Both mutual exclusion and progress

Answer

Answer: d [Reason:] None.

Operating System MCQ Set 3

1. Round robin scheduling falls under the category of :
a) Non preemptive scheduling
b) Preemptive scheduling
c) All of the mentioned
d) None of the mentioned

Answer

Answer: b [Reason:] None.

2. With round robin scheduling algorithm in a time shared system,
a) using very large time slices converts it into First come First served scheduling algorithm
b) using very small time slices converts it into First come First served scheduling algorithm
c) using extremely small time slices increases performance
d) using very small time slices converts it into Shortest Job First algorithm

Answer

Answer: a [Reason:] All the processes will be able to get completed.

3. The portion of the process scheduler in an operating system that dispatches processes is concerned with :
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
c) assigning running processes to blocked queue
d) all of the mentioned

Answer

Answer: a [Reason:] None.

4. Complex scheduling algorithms :
a) are very appropriate for very large computers
b) use minimal resources
c) use many resources
d) all of the mentioned

Answer

Answer: a [Reason:] Large computers are overloaded with greater number of processes.

5. The FIFO algorithm :
a) first executes the job that came in last in the queue
b) first executes the job that came in first in the queue
c) first executes the job that needs minimal processor
d) first executes the job that has maximum processor needs

Answer

Answer: b [Reason:] None.

6. The strategy of making processes that are logically runnable to be temporarily suspended is called :
a) Non preemptive scheduling
b) Preemptive scheduling
c) Shortest job first
d) First come First served

Answer

Answer: b [Reason:] None.

7. Scheduling is :
a) allowing a job to use the processor
b) making proper use of processor
c) all of the mentioned
d) none of the mentioned

Answer

Answer: a [Reason:] None.

8. There are 10 different processes running on a workstation. Idle processes are waiting for an input event in the input queue. Busy processes are scheduled with the Round-Robin timesharing method. Which out of the following quantum times is the best value for small response times, if the processes have a short runtime, e.g. less than 10ms ?
a) tQ = 15ms
b) tQ = 40ms
c) tQ = 45ms
d) tQ = 50ms

Answer

Answer: a [Reason:] None.

9. Orders are processed in the sequence they arrive if _______ rule sequences the jobs.
a) earliest due date
b) slack time remaining
c) first come, first served
d) critical ratio

Answer

Answer: c [Reason:] None.

10. Which of the following algorithms tends to minimize the process flow time ?
a) First come First served
b) Shortest Job First
c) Earliest Deadline First
d) Longest Job First

Answer

Answer: b [Reason:] None.

11. Under multiprogramming, turnaround time for short jobs is usually ________ and that for long jobs is slightly _____
a) Lengthened; Shortened
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged

Answer

Answer: b [Reason:] None.

12. Which of the following statements are true ? (GATE 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
a) I only
b) I and III only
c) II and III only
d) I, II and III

Answer

Answer: d [Reason:] I) Shortest remaining time first scheduling is a preemptive version of shortest job scheduling. It may cause starvation as shorter processes may keep coming and a long CPU burst process never gets CPU.
II) Preemption may cause starvation. If priority based scheduling with preemption is used, then a low priority process may never get CPU.
III) Round Robin Scheduling improves response time as all processes get CPU after a specified time.

Operating System MCQ Set 4

1. The most optimal scheduling algorithm is :
a) FCFS – First come First served
b) SJF – Shortest Job First
c) RR – Round Robin
d) None of the mentioned

Answer

Answer: b [Reason:] None.

2. The real difficulty with SJF in short term scheduling is :
a) it is too good an algorithm
b) knowing the length of the next CPU request
c) it is too complex to understand
d) none of the mentioned

Answer

Answer: b [Reason:] None.

3. The FCFS algorithm is particularly troublesome for ______
a) time sharing systems
b) multiprogramming systems
c) multiprocessor systems
d) operating systems

Answer

Answer: b [Reason:] In a time sharing system, each user needs to get a share of the CPU at regular intervals.

4. Consider the following set of processes, the length of the CPU burst time given in milliseconds :

   Process    Burst time
    P1           6
    P2           8
    P3           7
    P4           3

Assuming the above process being scheduled with the SJF scheduling algorithm :
a) The waiting time for process P1 is 3ms
b) The waiting time for process P1 is 0ms
c) The waiting time for process P1 is 16ms
d) The waiting time for process P1 is 9ms

Answer

Answer: a [Reason:] None.

5. Preemptive Shortest Job First scheduling is sometimes called :
a) Fast SJF scheduling
b) EDF scheduling – Earliest Deadline First
c) HRRN scheduling – Highest Response Ratio Next
d) SRTN scheduling – Shortest Remaining Time Next

Answer

Answer: d [Reason:] None.

6. An SJF algorithm is simply a priority algorithm where the priority is :
a) the predicted next CPU burst
b) the inverse of the predicted next CPU burst
c) the current CPU burst
d) anything the user wants

Answer

Answer: a [Reason:] The larger the CPU burst, the lower the priority.

7. One of the disadvantages of the priority scheduling algorithm is that :
a) it schedules in a very complex manner
b) its scheduling takes up a lot of time
c) it can lead to some low priority process waiting indefinitely for the CPU
d) none of the mentioned

Answer

Answer: c [Reason:] None.

8. ‘Aging’ is :
a) keeping track of cache contents
b) keeping track of what pages are currently residing in memory
c) keeping track of how many times a given page is referenced
d) increasing the priority of jobs to ensure termination in a finite time

Answer

Answer: d [Reason:] None.

9. A solution to the problem of indefinite blockage of low – priority processes is :
a) Starvation
b) Wait queue
c) Ready queue
d) Aging

Answer

Answer: d [Reason:] None.

10. Which of the following statements are true ? (GATE 2010)
i) Shortest remaining time first scheduling may cause starvation
ii) Preemptive scheduling may cause starvation
iii) Round robin is better than FCFS in terns of response time
a) i only
b) i and iii only
c) ii and iii only
d) i, ii and iii

Answer

Answer: d [Reason:] None.

11. Which of the following scheduling algorithms gives minimum average waiting time ?
a) FCFS
b) SJF
c) Round – robin
d) Priority

Answer

Answer: b [Reason:] None.

Operating System MCQ Set 5

1. CPU scheduling is the basis of _____
a) multiprocessor systems
b) multiprogramming operating systems
c) larger memory sized systems
d) none of the mentioned

Answer

Answer: b [Reason:] None.

2. With multiprogramming, ______ is used productively.
a) time
b) space
c) money
d) all of the mentioned

Answer

Answer: a [Reason:] None.

3. The two steps of a process execution are :
a) I/O & OS Burst
b) CPU & I/O Burst
c) Memory & I/O Burst
d) OS & Memory Burst

Answer

Answer: b [Reason:] None.

4. An I/O bound program will typically have :
a) a few very short CPU bursts
b) many very short I/O bursts
c) many very short CPU bursts
d) a few very short I/O bursts

Answer

Answer: c [Reason:] None.

5. A process is selected from the ______ queue by the ________ scheduler, to be executed.
a) blocked, short term
b) wait, long term
c) ready, short term
d) ready, long term

Answer

Answer: c [Reason:] None.

6. In the following cases non – preemptive scheduling occurs :
a) When a process switches from the running state to the ready state
b) When a process goes from the running state to the waiting state
c) When a process switches from the waiting state to the ready state
d) All of the mentioned

Answer

Answer: b [Reason:] There is no other choice.

7. The switching of the CPU from one process or thread to another is called :
a) process switch
b) task switch
c) context switch
d) all of the mentioned

Answer

Answer: d [Reason:] None.

8. Dispatch latency is :
a) the speed of dispatching a process from running to the ready state
b) the time of dispatching a process from running to ready state and keeping the CPU idle
c) the time to stop one process and start running another one
d) none of the mentioned

Answer

Answer: c [Reason:] None.

9. Scheduling is done so as to :
a) increase CPU utilization
b) decrease CPU utilization
c) keep the CPU more idle
d) None of the mentioned

Answer

Answer: a [Reason:] None.

10. Scheduling is done so as to :
a) increase the throughput
b) decrease the throughput
c) increase the duration of a specific amount of work
d) None of the mentioned

Answer

Answer: a [Reason:] None.

11. Turnaround time is :
a) the total waiting time for a process to finish execution
b) the total time spent in the ready queue
c) the total time spent in the running queue
d) the total time from the completion till the submission of a process

Answer

Answer: d [Reason:] None.

12. Scheduling is done so as to :
a) increase the turnaround time
b) decrease the turnaround time
c) keep the turnaround time same
d) there is no relation between scheduling and turnaround time

Answer

Answer: b [Reason:] None.

13. Waiting time is :
a) the total time in the blocked and waiting queues
b) the total time spent in the ready queue
c) the total time spent in the running queue
d) the total time from the completion till the submission of a process

Answer

Answer: b [Reason:] None.

14. Scheduling is done so as to :
a) increase the waiting time
b) keep the waiting time the same
c) decrease the waiting time
d) none of the mentioned

Answer

Answer: c [Reason:] None.

15. Response time is :
a) the total time taken from the submission time till the completion time
b) the total time taken from the submission time till the first response is produced
c) the total time taken from submission time till the response is output
d) none of the mentioned

Answer

Answer: b [Reason:] None.

ed010d383e1f191bdb025d5985cc03fc?s=120&d=mm&r=g

DistPub Team

Distance Publisher (DistPub.com) provide project writing help from year 2007 and provide writing and editing help to hundreds student every year.