wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Operating System Quiz 2

Total questions: 35

Worksheet time: 25mins

Name
Class
Date
1.

Which of the following scheduling algorithms is non-preemptive? (GATE CS 2002) 

a)

Round Robin 

b)

First-In First-Out 

c)

Multilevel Queue Scheduling 

d)

Multilevel Queue Scheduling with Feedback 

2.

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

a)

FCFS: P1, P2, P3 RR2: P1, P2, P3

b)

FCFS: P1, P3, P2 RR2: P1, P3, P2

c)

FCFS: P1, P2, P3 RR2: P1, P3, P2

d)

FCFS: P1, P3, P2 RR2: P1, P2, P3

3.

Consider the following table of arrival time and burst time for three processes P0, P1 and P2.

The pre-emptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?

a)

5.0 ms

b)

4.33 ms

c)

6.33 ms

d)

7.33 ms

4.

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

a)

I only

b)

I and III only

c)

II and III only

d)

I, II and III

5.

An operating system uses Shortest Remaining Time first (SRT) process scheduling algorithm. Consider the arrival times and execution times for the following processes

What is the total waiting time for process P2?

a)

5

b)

15

c)

40

d)

55

6.

Consider a set of n tasks with known runtimes r1,r2,.....rn to be run on a uniprocessor machine. Which of the following processor scheduling algorithms will result in the maximum throughput?.

a)

Round Robin

b)

Shortest-Job First

c)

Highest-Response-Ratio-Next

d)

First-Come-First-Served

7.
Allocating time on the processor to individual processes is known as...
a)
CPU Scheduling
b)
CPU Timing
c)
CPU Clocking
d)
CPU Sorting
8.

In a operating system, the purpose of the stack is...

a)

To store the return addresses of called functions

b)

To keep the parameters of called functions

c)

To store local variables

d)

All of the above

9.

The memory returned by a call to malloc comes from the...

a)

data segment

b)

heap segment

c)

text segment

d)

stack segment

10.

Operating System is not responsible to manage all resources

a)

True

b)

False

11.

The grouping of jobs that require similar resources

a)

timesharing

b)

serial processing

c)

multiprogramming

d)

batch processing

12.

The operating system is a type of

a)

system software

b)

general purpose software

c)

utility software

d)

application software

13.

Which is not in the PCB

a)

Process state

b)

resources needed

c)

program counter

d)

processor size

14.

A signal sent by a hardware or software to CPU indicating that something needs attention

a)

disturbance

b)

interrupt

c)

waiting

d)

exclusion

15.

FCFS is operates similar to a

a)

stack

b)

sorting algorithm

c)

circle

d)

queue

16.

Which of the following statements is/are TRUE with respect to deadlocks?

a)

Circular wait is a necessary condition for the formation of deadlock.

b)

In a system where each resource has more than one instance, a cycle in its wait for graph indicates the presence of a deadlock.

c)

If the current allocation of resources to processes leads the system to unsafe state, then deadlock will necessarily occur.

d)

In the resource-allocation graph of a system, if every edge is an assignment edge, then the system is not in deadlock state.

17.

Which of the following is a correct statement about memory management in Operating Systems?

a)

Memory management is responsible for managing the execution of processes.

b)

Memory management ensures that each process gets a fair share of CPU time.

c)

Memory management is responsible for allocating and deallocating memory to processes.

d)

Memory management is only required in multi-user operating systems.

18.

What is the maximum number of instances a process can request in a system with 4 instances of a resource type?

a)

1

b)

2

c)

3

d)

4

19.

Which of the following is not related to synchronization in Operating System?

a)

Bounded Buffer problem

b)

Readers-Writers problem

c)

Dining Philosophers problem

d)

Belady's Anomaly

20.

What do device drivers do?

a)

Allows the OS to communicate with hardware

b)

Drives around the motherboard

c)

Increases the amount of storage

21.

How many applications can be processed by the CPU at a time?

a)

1

b)

2

c)

3

d)

Several

22.

To access the services of the operating system, the interface is provided by the

a)

Library

b)

System calls

c)

Assembly instructions

d)

API

23.

How many process states are there?

a)

4

b)

5

c)

6

d)

7

24.

Select the different process queues:

a)

New

b)

Wait

c)

Arrival

d)

Job

25.

Which of the following need not necessarily be saved on a context switch between processes?

a)

General purpose registers

b)

Program counter

c)

Translation look-aside buffer

d)

All of the above

26.

The maximum number of processes that can be in Ready state for a computer system with n CPUs is

a)

n

b)

n^2

c)

2^n

d)

Independent of n

27.

Explain the concept of a resource allocation graph in the context of deadlock in operating systems.

a)

It is a graph that depicts the allocation of resources to processes and is used to identify and create deadlock.

b)

It is a graph that depicts the allocation of resources to processes and is used to identify and prevent deadlock.

c)

It is a graph that depicts the allocation of resources to processes and is used to identify and resolve deadlock.

d)

It is a graph that depicts the allocation of resources to processes and is used to create and prevent deadlock.

28.

What are the necessary conditions for deadlock to occur?

a)

Unlimited resources, no mutual exclusion

b)

Mutual exclusion, hold and wait, no preemption, and circular wait

c)

Preemption of resources, circular exclusion

d)

Limited resources, no hold and wait

29.

Discuss one method for deadlock prevention in operating systems.

a)

Restart the system

b)

Use resource allocation graph

c)

Increase the number of processes

d)

Ignore the deadlock

30.

Discuss one technique for deadlock recovery in operating systems.

a)

Memory allocation

b)

CPU scheduling

c)

Process termination

d)

Disk defragmentation

31.

The strategy of allowing processes that are logically runnable to be temporarily suspended is called

a)

preemptive scheduling

b)

non preemptive scheduling

c)

shortest job first

d)

first come first served

32.

Semaphores are used to solve

a)

Deadlock

b)

Mutual exclusion

c)

Inter-process Communication

d)

Messaging

33.

Only the process executing the critical section is allowed access to the shared variable,all other processes should prevented from doing so until the completion of the critical section. This is often referred to as-

a)

Mutual exclusion

b)

semaphores

c)

Deadlock

d)

Interprocess communication

34.

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

35.

It is used to store information for immediate access by the CPU.

a)

CPU

b)

Main Memory

c)

Input/Output Devices

d)

Secondary Memory