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

Question Bank_operating System_unit_1 to 6

The document is a comprehensive question bank on Operating Systems, structured into six units covering various topics such as definitions, functions, scheduling algorithms, process synchronization, deadlocks, memory management, and file systems. Each unit contains detailed questions that require explanations, comparisons, and examples related to operating system concepts. The document serves as a study guide for understanding the fundamental principles and mechanisms of operating systems.

Uploaded by

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

Question Bank_operating System_unit_1 to 6

The document is a comprehensive question bank on Operating Systems, structured into six units covering various topics such as definitions, functions, scheduling algorithms, process synchronization, deadlocks, memory management, and file systems. Each unit contains detailed questions that require explanations, comparisons, and examples related to operating system concepts. The document serves as a study guide for understanding the fundamental principles and mechanisms of operating systems.

Uploaded by

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

Operating System - Question Bank

-------------------------------------------------------------------------------------------------------
UNIT: 1
Introduction: Definition, Functions of Operating Systems, Evolution of Operating Systems,
Types of OS, Structural Overview, Services Provided by OS, System Programs and System Calls.
-------------------------------------------------------------------------------------------------------

1) What is operating system? Explain different types of operating systems along with their
advantages and disadvantages.

2) Discuss in detail about structure of operating system.

3) Explain the following (any three):


a) Multiprogramming operating system
b) Time sharing operating system
c) Real time operating system
d) Batch operating system

4) What are the type of services offered by operating system? Discuss in detail.

5) Define Operating System. Explain batch, time sharing and real time operating system in
detail.

6) What is system call? Explain various system calls.

7) Define essential properties of the following type of OS.


a) Batch OS
b) Time sharing OS
c) Real time OS
d) Distributed OS

8) How does a microkernel differ from conventional kernel? Briefly list the motivation and
difficulties behind this.

9) Describe difference between symmetric and asymmetric multiprocessing. What are the
advantages and disadvantages of multiprocessor system?

10) What is the purpose of system calls? Enumerate five system calls used in process
management or file management.

11) Distinguish between multitasking, multiprogramming and multiprocessing.

-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
UNIT: 2
Scheduling: Process concept, Process control block, Types of scheduler, Context switch,
Scheduling criteria and different scheduling algorithms
Threads: Overview, Multithreading model
-------------------------------------------------------------------------------------------------------

1) What is process control block? Explain in detail about process control block. Also explain
process state transition.

2) Differentiate between preemptive and non- preemptive process scheduling.

3) Consider the following set of processes with the length of the CPU-burst time given in
milliseconds.
Process Burst time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2

The processes are assumed to have arrived in order P1,P2,P3,P4,P5 at time 0.


a) Draw a Gantt charts illustrating the execution of these processor using FCFS, SJF, non-
preemptive priority and RR scheduling.
b) What is the turnaround time of each process for each scheduling algorithm in part a?
c) What is the waiting time of each process for each of the scheduling algorithm in part a?
d) Which of the scheduler in part a results in the minimal avg waiting time?

4) Consider the set of processes, with the arrival time (in milliseconds), CPU burst time (in
milliseconds), and priority (0 is the highest priority) shown below. None of the processes
have I/O burst time.

Process Arrival Time Burst Time Priority


P1 0 11 2
P2 5 28 0
P3 12 2 3
P4 2 10 1
P5 9 16 4

Compute average turnaround time and average waiting time using SJF and Priority CPU
scheduling algorithm.
5) Differentiate between preemptive and non-preemptive scheduling. State why strict non-
preemptive scheduling is unlikely to be used in a computer system?

6) Give the performance criteria for selection of scheduling algorithms?

7) Consider the following set of processes with the arrival time and CPU burst time given below:

Process Arrival Time Burst Time


P1 0 4
P2 1 5
P3 2 2
P4 3 1
P5 4 6
P6 6 3

Compute average turnaround time and average waiting time using following algorithm.
a) RR Time Slice 2
b) RR Time Slice 3

8) Explain the following terms:


a) Throughput
b) Turn-around time
c) Waiting time
d) Response time
e) CPU Utilization

9) Assume you have the following jobs to execute with one processor with jobs arriving in the
order listed below:

Job Burst Time Arrival Time


0 80 0
1 20 10
2 10 10
3 20 80
4 50 85

Suppose a system uses RR scheduling with quantum of 15, find avg waiting time, turnaround
time of these jobs.
10) Consider the 4 process P1,P2,P3,P4 with the length of CPU burst time as follows:

Process Arrival Time Burst Time Priority


P1 0 8 3
P2 1 4 4
P3 2 2 2
P4 3 5 1

Draw Gantts chart for each of the following algorithms and compute average waiting time.
a) FCFS
b) RR(T.S=2MS)
c) PRIORITY (WITH PREEMPTIVE)

11) What is scheduler? What are different types of schedulers? Explain in detail.

12) What are threads and multithreading? Explain different types of threads with neat sketches.

13) Explain various multithreading models?

14) Consider four processes P1, P2, P3, P4 with length of CPU burst time.

Process Arrival Time Burst Time


P0 0 75
P1 10 50
P2 10 25
P3 80 20
P4 85 45

Find out average waiting time and average turnaround time for the following algorithms:
a) FCFS
b) RR (Slice = 15 ms)
c) SJF Preemptive and Non-Preemptive

15) Differentiate between user level and kernel level thread.

16) Explain three levels of scheduler present in a system.

17) Discuss in detail about PCB (process control block) & context switching.

18) Define thread. How it differs from process?

-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
UNIT: 3
Process cooperation and synchronization: Race condition, Critical section problem, software
and hardware solution, Semaphores, conditional critical regions and monitors, Classical Inter Pro-
cess Communication Problems.
-------------------------------------------------------------------------------------------------------

1) What is Race Condition? Illustrate it with suitable example.

2) What is Critical Section Problem? Discuss in detail.

3) What are the three requirements which must be satisfied by solution to critical section
problem? Discuss about all requirements in detail.

4) Discuss in detail about Producer Consumer problem as classical problem of process


synchronization.

5) What is Semaphore? Discuss it with suitable example.

6) How does semaphore is used to implement mutual exclusion? Discuss it with suitable
example.

7) Discuss in detail about implementation of strict alteration of processes using binary


semaphores? Illustrate your answer with suitable example.

8) Explain how improper implementation of a semaphore can lead to a deadlock.

9) What are P and V operations in process synchronization? Explain these operations with
respect to counting semaphores.

10) Explain in detail about software based solution to critical section problem.

11) What is Semaphore? What is the difference between a binary and counting semaphore?

12) Each process Pi , i = 1, 2,…..9 is coded as follows:


repeat
P(mutex)
{ Critical Section }
V(mutex)
forever
The code for P10 is identical except that it uses V(mutex) in place of P(mutex).
What is largest number of processes that can be inside the critical section at any moment?
Justify your answer with proper explanation.
13) A counting semaphore was initialized to 10. Then 16 P(wait) operations and 4 V(signal)
operations were completed on this semaphore. Compute the following:
a) The resultant value of semaphore
b) No. of processes blocked

14) Let m[0]…m[4] be mutexes (binary semaphores) and P[0]…P[4] be processes. Suppose
each process P[i] executes the following:
wait(m[i]; wait(m[i+1]mod4]);
…….
release(m[i]; release(m[i+1]mod4]);

Above program code will be deadlock free or not if processes are executed in concurrent
way? Justify your answer.

-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
UNIT: 4
Deadlocks & Protection: Deadlock definition, Prevention, Avoidance, Detection and recovery.
Access Matrix: Goals of Protection, Access matrix, Implementation of access matrix, Security
problem
-------------------------------------------------------------------------------------------------------

1) Explain the Resource Allocation graph algorithm.

2) Explain Banker’s algorithm for deadlock avoidance with suitable example.

3) What is deadlock? What are the necessary conditions for deadlock situation to arise?

4) Explain various Deadlock prevention methods.

5) Consider the following snapshot of a system:

Processes Allocation Max


A B C A B C
P0 0 0 1 1 1 1
P1 2 0 0 3 2 3
P2 1 3 2 4 3 1
P3 1 0 1 0 0 1
P4 0 0 1 3 2 1

Let A, B, and C having resource with instance of 7,3 and 6 respectively. Then compute:
a) What is the contents of NEED matrix?
b) Whether the system in safe state or not?

6) What are several methods for enforcement of protection and security threats? Also compare
Access list and capability list.

7) What security measures can be used to protect your system from unauthorized access.

8) A computer system uses the Bankers algorithm to deal with deadlocks. It’s current state is
shown in tables below, where P0,P1,P2 and processes and R0,R1,R2 are resource types.

Processes Max Need Current Allocation Available


R0 R1 R2 R0 R1 R2 R0 R1 R2
P0 4 1 2 1 0 2 2 2 0
P1 1 5 1 0 3 1
P2 1 2 3 1 0 2
a) What is the content of need matrix?
b) Show that the system can be in safe state

9) Write short notes on issues involved in deadlock recovery.

10) A single processor system has three resource types X, Y, Z which are shared by three
processes. There are 5 units of each resource type. Consider the following scenario, where
column alloc denotes the number of unit of each resource type allocated to each process,
and the column request denotes number of units of each resource type requested by a
process in order to complete the execution.

alloc request

X Y Z X Y Z

P0 1 2 1 1 0 3

P1 2 0 1 0 1 2

P2 2 2 1 1 2 0

Which of these processes will finish LAST?

-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
UNIT: 5
Memory Management: Contiguous Memory Allocation Schemes, Paging, Segmentation,
Segmentation with paging, Virtual Memory: demand paging, page Faults and instruction restart,
page replacement algorithms, Allocation of Frames, Thrashing.
-------------------------------------------------------------------------------------------------------
1) Differentiate between Internal and External fragmentation.

2) A computer installation has 1000K of memory. The jobs arrive and finish in the following
sequences.
Job 1 requiring 200K arrives
Job 2 requiring 350K arrives
Job 3 requiring 300K arrives
Job 1 finishes
Job 4 requiring 120K arrives
Job 5 requiring 150K arrives
Job 6 require 80K arrives
Between Best Fit and First Fit, which algorithm performs better for this sequence.

3) Explain contiguous memory allocation policies.

4) In a computer system where the best fit algorithm is used for allocating jobs to memory
partitions, the following situation was encountered:

Partition Sizes in KB 4 8 20 2
Job Sizes in KB 2 14 3 6 6 10 20 2
Time for execution 4 10 2 1 4 1 8 6

When will the 20KB job complete?

5) Consider the following page reference string:


7 0 1 2 0 3 0 4 2 3 0 3 2 1 2
How many page fault would occur for the following page replacement algorithm assuming
3 frames?
a) FIFO
b) Optimal
c) LRU

6) What do you mean by address binding? Suggest the time at which address binding is
achieved during execution.

7) Discuss the following


a) Translation look a side buffer.
b) Segmentation with paging memory management technique.
8) Explain in brief Belady’s Anomaly. Prove it for memory reference string
A,B,C,D,A,B,E,A,B,C,D,E by taking no. of frames 3 and 4.

9) Explain under what circumstances to page fault occur? Describe the action taken by
operating system when a page fault occurs.

10) Assume that a main memory with only 4 pages, each of 16 bytes, is initially empty.
The CPU generates following sequence of virtual addresses and uses LRU policy:
0 4 8 20 24 36 44 12 68 72 80 84 28 32 88 92
a) How many page faults does this sequence cause?
b) What are the page numbers of pages present in the main memory at the end of the
sequence?

11) Explain segmentation with paging memory management techniques.

12) Explain the following concepts.


i) Demand paging.
ii) Advantages of using virtual memory from users and system point of view.

13) Consider the page of reference string


1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,9,2
Assume page frame size = 4, Find out the algorithm having minimum page fault rate:
i) FIFO
ii) LRU
iii) Optimal
14) Discuss paging and segmentation for mapping the virtual address with physical address
with neat diagram.

15) Discuss in detail about following concepts:


a) Thrashing
b) Locality of reference
c) Working sets

-------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------
UNIT: 6
File System: Directory Structure, File-System Mounting, File Sharing & Protection. File-System
Structure, File-System Implementation. Directory Implementation, Disk space management and
space allocation strategies, File Recovery, Disk arm scheduling strategies.
-------------------------------------------------------------------------------------------------------
1) Suppose that a disk has 2000 cylinders, numbered 0 to 1999. The drive is currently serving
a request at cylinder 190 and the previous request at cylinder 143. The queue of pending
requests, in FIFO order is: 86,1890,913,1674,948,1509,1022,1750,183
Starting from the current head position, What is the total distance that the disk arm moves
to satisfy all the pending requests for each of the following disk scheduling algorithms?
a) FCFS
b) SSTF
c) SCAN
d) LOOK
e) C-SCAN
f) C-LOOK

2) Explain in brief about directory structures.

3) What are the pieces of information associated with open file? Explain each of them.

4) Write short note on:


a) Disk allocation methods.
b) File access methods.

5) Explain in brief directory structure.

6) Explain different disk space allocation method.

7) A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the
request of reading data from track 120, and the previous request, service was for track
90. The pending requests (in order of their arrival) are for track numbers:
30 70 115 130 110 80 20 25
How may time will the head change its direction for the disk scheduling policies SSTF
(Shortest Seek Time First) and FCFS(First Come First serve?

8) Explain Swap Space Management.

9) Explain various attributes related with file in detail.


10) Explain the following terms
a) Seek Time
b) Access time
c) Rotational latency

-------------------------------------------------------------------------------------------------------

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy