18csc205j-Operating Systems Question Bank
18csc205j-Operating Systems Question Bank
QUESTION BANK
IV SEMESTER
2018 Regulation
QUESTIONBANK
SEM/YEAR: II/IV
Course Outcomes
CLO-1 : Identify the need of an Operating system
CLO-2 : Know the Process management functions of an Operating system
CLO-3 : Understand the need of Memory Management functions of an Operating system
CLO-4 : Find the significance of Device management role of an Operating system
CLO-5 : Recognize the essentials of File Management part of an Operating system
CLO-6 :Gain an insight of Importance of an Operating system through practical
UNIT I
Operating System Objectives and functions - Gaining the role of Operating systems - The evolution of
operating system, Major Achievements - Understanding the evolution of Operating systems from early
batch processing systems to modern complex systems - Process Concept– Processes, PCB -
Understanding the Process concept and Maintenance of PCB by OS -Threads – Overview and its Benefits
- Understanding the importance of threads - Process Scheduling : Scheduling Queues, Schedulers,
Context switch - Understanding basics of Process Scheduling - Operations on Process – Process creation,
Process termination - Understanding the system calls – fork(),wait(),exit() - Inter Process
communication : Shared Memory, Message Passing ,Pipe() -Understanding the need for IPC - Process
synchronization: Background, Critical section Problem - Understanding the race conditions and the need
for the Process synchronization
PART-A (Multiple Choice Questions)
Q. Course Competence
Questions Outcome BT Level
No
1 A process is selected from the ______ queue by the ________ scheduler,
to be executed.
a) blocked, short term b) wait, long term c) ready, short CO1 BT1
term d) ready, long term
2 The switching of the CPU from one process or thread to another is called CO1 BT1
:
a) process switch b) task switch c) context switch
d) All of these
3 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 CO1 BT1
c) the time to stop one process and start running another one
d) None of these
5 The processes that are residing in main memory and are ready and
waiting to execute are kept on a list called
a) job queue b) ready queue c) execution queue d) process CO1 BT1
queue
15 In a programmed input/output(PIO) :
a) the CPU uses polling to watch the control bit constantly, looping
to see if device is ready
b) the CPU writes one data byte to the data register and sets a bit in
control register to show that a byte is available CO1 BT1
c) the CPU receives an interrupt when the device is ready for the next
byte
d) the CPU runs a user written code and does accordingly
21 What is a trap/exception ?
a) hardware generated interrupt caused by an error
b) software generated interrupt caused by an error CO1 BT1
c) user generated interrupt caused by an error
d) None of these
22 What is an ISR ?
a) Information Service Request
b) Interrupt Service Request CO1 BT1
c) Interrupt Service Routine
d) Information Service Routine
25 The OS X has
a) monolithic kernel
b) hybrid kernel CO1 BT1
c) microkernel
d) monolithic kernel with modules
PART B (4 Marks)
1 Illustrate the factors that usually determine the degree of Multi
Programming
i. The number of Programs residing in Primary memory.
ii. Passing of the control of the CPU rapidly between these CO1 BT2
programs.
iii. Protection of user process from one another.
UNIT II
PROCESS SYNCHRONIZATION : Peterson’s solution, Synchronization Hardware, Understanding the
two-process solution and the benefits of the synchronization hardware, Process synchronization:
Semaphores, usage, implementation, Gaining the knowledge of the usage of the semaphores for the
Mutual exclusion mechanisms, Classical Problems of synchronization – Readers writers problem,
Bounded Buffer problem, Good understanding of synchronization mechanisms, Classical Problems of
synchronization – Dining Philosophers problem (Monitor ), Understanding the synchronization of limited
resources among multiple processes, CPU SCHEDULING : FCFS,SJF,Priority, Understanding the
scheduling techniques, CPU Scheduling: Round robin, Multilevel queue Scheduling, Multilevel feedback
Scheduling, Understanding the scheduling techniques, Real Time scheduling: Rate Monotonic
Scheduling and Deadline Scheduling, Understanding the real time scheduling, DEADLOCKS: Necessary
conditions, Resource allocation graph, Deadlock prevention methods, Understanding the deadlock
scenario, Deadlocks :Deadlock Avoidance, Detection and Recovery, Understanding the deadlock
avoidance, detection and recovery mechanisms
PART-A (Multiple Choice Questions)
Q. Course Competenc
e
Questions Outcome BT Level
No
1 1. Which process can be affected by other processes executing in the
system?
a) cooperating process CO2 BT1
b) child process
c) parent process
d) init process
2 If a process is executing in its critical section, then no other processes
can be executing in their critical section. What is this condition called?
a) mutual exclusion BT1
CO2
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion
3 Which one of the following is a synchronization tool?
a) thread
b) pipe CO2 BT1
c) semaphore
d) socket
4 A semaphore is a shared integer variable __________
a) that can not drop below zero
b) that can not be more than zero CO2 BT2
c) that can not drop below one
d) that can not be more than one
5 Mutual exclusion can be provided by the __________
a) mutex locks
b) binary semaphores CO2 BT1
c) both mutex locks and binary semaphores
d) none of the mentioned
6 When high priority task is indirectly preempted by medium priority task CO2 BT1
effectively inverting the relative priority of the two tasks, the scenario is
called __________
a) priority inversion
b) priority removal
c) priority exchange
d) priority modification
7 Process synchronization can be done on __________
a) hardware level
b) software level CO2 BT1
c) both hardware and software level
d) none of the mentioned
8 Peterson solution is restricted to ----------- process that alternate
execution between their critical section and remainder sections.
a)one
b) two CO2 BT2
c) three
d) four
14 In the bounded buffer problem, there are the empty and full semaphores CO2 BT1
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) count the number of empty and full process
16 Which module gives control of the CPU to the process selected by the
short-term scheduler?
a) dispatcher BT1
b) interrupt CO2
c) scheduler
d) none of the mentioned
17 The processes that are residing in main memory and are ready and
waiting to execute are kept on a list called _____________
a) job queue BL1
CO2
b) ready queue
c) execution queue
d) process queue
18 The interval from the time of submission of a process to the time of
completion is termed as ____________
a) waiting time BT1
CO2
b) turnaround time
c) response time
d) throughput
19 Which scheduling algorithm allocates the CPU first to the process that
requests the CPU first?
a) first-come, first-served scheduling BT1
CO2
b) shortest job scheduling
c) priority scheduling
d) none of the mentioned
20 In priority scheduling algorithm ____________
a) CPU is allocated to the process with highest priority
b) CPU is allocated to the process with lowest priority CO2 BT2
c) Equal priority processes can not be scheduled
d) None of the mentioned
21 In priority scheduling algorithm, when a process arrives at the ready
queue, its priority is compared with the priority of ____________
a) all process BT2
b) currently running process CO2
c) parent process
d) init process
22 Process are classified into different groups in ____________
a) shortest job scheduling algorithm
b) round robin scheduling algorithm CO2 BT1
c) priority scheduling algorithm
d) multilevel queue scheduling algorithm
23 What is a reusable resource?
a) that can be used by one process at a time and is not depleted by
that use BT2
CO2
b) that can be used by more than one process at a time
c) that can be shared between various threads
d) none of the mentioned
24 Which one of the following is the deadlock avoidance algorithm?
a) banker’s algorithm
b) round-robin algorithm CO2 BT1
c) elevator algorithm
d) karn’s algorithm
25 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 CO2 BT1
c) resource once available can disappear
d) all of the mentioned
26 A problem encountered in multitasking when a process is perpetually
denied necessary resources is called ____________
a) deadlock BT1
CO2
b) starvation
c) inversion
d) aging
27 To avoid deadlock ____________
a) there must be a fixed number of resources to allocate
b) resource allocation must be done only once CO2 BT2
c) all deadlocked processes must be aborted
d) inversion technique can be used
28ThThe request and release of resources are ___________
a) command line statements
b) interrupts
c) system calls CO2 BT1
d) special programs
PART B (4 Marks)
1 What is busy waiting? CO2 BT2
2 Write short notes on turn around time, waiting time and response time CO2 BT1
3 What is a binary semaphore? CO2 BT1
4 What is the difference between synchronization and mutual exclusion? CO2 BT2
5 List the Coffman’s conditions that lead to a deadlock. CO2 BT2
6 List the three requirements that must be satisfied by critical section problem. CO2 BT1
7 Write short notes on semaphore CO2 BT1
8 Illustrate about Petersons solution CO2 BT2
9 Examine about mutex locks CO2 BT1
10 Discuss about priority inversion with an example CO2 BT2
11 Define CPU Scheduling. CO2 BT1
12 What is Preemptive and Non - Preemptive scheduling? CO2 BT1
13 What are the various scheduling criteria for CPU Scheduling? CO2 BT1
14 Define Entry Section and Exit Section. CO2 BT1
15 Give two hardware instructions and their definitions which can be used CO2
for implementing Mutual Exclusion. BT2
16 How can we say the First Come First Served scheduling algorithm is CO2 BT2
Non Preemptive?
17 Differentiate Long Term Scheduler and Short Term Scheduler CO2 BT1
18 What are a Safe State and an Unsafe State? CO2 BT1
19 What is a Gantt Chart? CO2 BT1
20 Define Request Edge and Assignment Edge. CO2 BT1
PART C (12 Marks)
1 Outline a solution using semaphores to solve dinning philosopher problem. CO2 BT2
2 Compute non-preemptive SJF scheduling algorithm CO2
3 Consider the following set of processes with the length of the CPU-burst CO2
time in given
ms:
4 Show how wait () and signal() semaphore operations could be implemented in CO2
multiprocessor environments, using Test and Set instructions. The solution BT2
should exhibit minimal busy waiting. Develop pseudo code for implementing
operations.
5 Explain in detail about multilevel queue scheduling CO2 BT1
6 Describe about multilevel feedback scheduling CO2 BT1
7 With an example explain about resource allocation graph CO2 BT1
8 Illustrate Bankers algorithm with an example CO2 BT2
9 Describe Deadlock prevention in detail. CO2 BT2
10 Explain the methods for handling deadlocks. CO2 BT2
UNIT III
MEMORY MANAGEMENT: Memory Management: Logical Vs Physical address space, Swapping and
understanding the basics of Memory management Contiguous Memory allocation – Fixed and Dynamic
partition Getting to know about Partition memory management and issues: Internal fragmentation and
external fragmentation problems Strategies for selecting free holes in Dynamic partition Understanding the
allocation strategies with examples Paged memory management Understanding the Paging technique.PMT
hardware mechanism Structure of Page Map Table Understanding the components of PMT Example : Intel
32 bit and 64 –bit Architectures Understanding the Paging in the Intel architectures Example : ARM
Architectures Understanding the Paging with respect to ARM Segmented memory management
Understanding the users view of memory with respect to the primary memory Paged segmentation
Technique Understanding the combined scheme for efficient management
PART B (4 Marks)
1 How is memory protected in a paged environment? CO3 BT1
2 What is External Fragmentation? CO3 BT1
3 What is the use of Valid-Invalid Bits in Paging? CO3 BT2
4 Explain memory management without swapping or paging CO3 BT1
5 Explain page replacement algorithms CO3 BT2
6 Why page sizes are always power of 2? CO3 BT1
7 List two differences between logical and physical addresses. CO3 BT4
8 Define demand paging in memory management. CO3 BT1
9 What are the steps required to handle a page fault in demand paging? CO3 BT1
10 Tell the significance of LDT and GDT in segmentation. CO3 BT1
11 Explain dynamic loading. CO3 BT2
12 What is Demand Paging? CO3 BT1
13 How the problem of external fragmentation can be solved CO3 BT1
14 Formulate how long a paged memory reference takes if memory CO3
reference takes 200 nanoseconds.Assume a paging system with page BT6
table stored in memory
15 Define Address binding. CO3 BT1
16 What is Internal Fragmentation? CO3 BT1
17 What do you mean by Compaction? CO3 BT1
18 What is the difference between user-level instructions and privileged CO3
BT1
instructions?
19 What is memory stall? CO3 BT1
20 Define logical address space CO3 BT1
PART C (12 Marks)
1 Elaborate about the free space management on I/O buffering and CO3 BT6
blocking.
2 Explain about given memory management techniques. (i) CO3 BT5
Partitioned allocation (ii) Paging and translation look-aside buffer.
3 When page faults will occur? Describe the actions taken by CO3 BT1
operating system during page fault.
4 Explain about the difference between internal fragmentation and CO3 BT5
external fragmentation
5 Why are segmentation and paging sometimes combined into one CO3 BT1
scheme?
6 Compare paging with segmentation in terms of the amount of CO3
memory required by the address translation structures in order to BT2
convert virtual addresses to physical addresses.
7 Most systems allow programs to allocate more memory to its CO3
address space during execution. Data allocated in the heap
segments of programs is an example of such allocated memory. BT1
What is required to support dynamic memory allocation in the
following schemes?
8 Explain the difference between logical address and physical CO3 BT1
address.
9 Define Compaction and explain why it is used. CO3 BT1
10 Define Contiguous Allocation. CO3 BT5
UNIT IV
VIRTUAL MEMORY– Background-Understanding the need of demand paging-VIRTUAL
MEMORY – Basic concepts – page fault handling -Understanding , how an OS handles the page
faults-Performance of Demand paging-Understanding the relationship of effective access time and the
page fault rate-Copy-on write-Understanding the need for Copy-on write -Page replacement
Mechanisms: FIFO, Optimal, LRU and LRU approximation Techniques-Understanding the Pros and
cons of the page replacement techniques-Counting based page replacement and Page Buffering
Algorithms -To know on additional Techniques available for page replacement strategies-Allocation
of Frames - Global Vs Local Allocation -Understanding the root cause of the Thrashing-Thrashing,
Causes of Thrashing -Understanding the Thrashing -Working set Model-Understanding the working set
model for controlling the Working set Model
6 Which algorithm is based on the argument that the page with the
smallest count?
a) Least frequently Used
UNIT V
STORAGE MANAGEMENT: Mass storage structure – Overview of Mass storage – Magnetic Disks –
Understanding the Basics in storage management – Disk Scheduling – Understanding the various
scheduling with respect to the disk – FILE SYSTEM INTERFACE: File concept, File access methods –
Understanding the file basics – File sharing and Protection – FILE SYSTEM IMPLEMENTATION: File
system structure – Directory Implementation – Understanding the various levels of directory structure-
Free space Management – Swap space Management
Note:
2. CO – Course Outcomes
BTL1 –Remember BTL2 – Understand BTL3 – Apply BTL4 – Analyze BTL5 – Evaluate
BTL6 – Create