0 ratings0% found this document useful (0 votes) 50 views37 pagesOS Question Bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Operating System (3~ 0-2)
Evaluation:
Sessional,
inal
owl
|
Conrst Objectives:
1. To provide the students with the knowled;
systems.
2. To gain knowledge about the.
VO management, CPI
Conrse- Contents:
L
LL |
12)
| 12.1 Processes
122. Files
1.2.3. System Calls
1.2.4. The Shell
Operating System Stracture
13.1 Monolithic Systems
13.2 Layered
Virtual Machines
13.4 Client-Server
w
Processes and Threads
[Link] Concepts
1.1.1. Inuoduction
2.1.2. Definition of Process
21.3. Process States and Transition
2.1.4. PCB {Process Control Block)
my
-2. _ IPC {tnter-Process Communication)
2.2.1. Critical Regions and Conditions
2.2.2. Mutual Exclusion
‘Types and Structire of Operating Systems _
Introduction and History of Operating Systein
Operating System Concepts and Funetionalities
ereTagATE, APR SS VIARRERR
NCIT College
ige of basics design principles of operating
Opeiating Systems concepts such as process, memory,
'U and disk scheduling etc.
(4 brs)
Types and Evolution of Operating Systems
(16 brs)
2.1.5. Concurrent Process, Parallel Processing
2.2.3. Mutual Exclusion Primitives and Jmplementation
2.23.1, Dekker’s Algorithm
2. Peterson’s Algorithm
TSL (Test and Set Lock)
g Locks
2.2.4. Proclucer and Consumer problem2.2.5. Monitors
2.2.6. Message Passing
2.2.7. Classical IPC Problems
[Link]. The Dining Philosophers Problem
[Link]. The Readers and Writers Problem
[Link]. The Sleeping Barber Problem
2.3. Deadlock and Indefinite Postponement:
2.3.1 Intreduction
[Link] Preemptable and Nonpreemptable Resources
[Link] Conditions for Deadlack
[Link] Deadlock Modeling
2.3.2. Deadlock Avoidance
2.3.3. Deadlock Detection and Recovery ,
2.3.4. Deadlock Prevention
2.3.5. Issues Related to Deadlocks
23.5.1, Two Phase Locking
23:52, Non resource Deadlocks
‘23.5.3. Starvation
‘Thread Model
Thread Usage
Advantages of Threads
‘User Space and Kemel Space Threads
Multitheeading Model
Differences between Threads and Processes
(hrs)
“1. Tntroduction and Architecture of a Keme}
3.2. “Types of Kernels
3.3. Context Switching (Kemel mode and User mode)
3.4. _ First Level Intesrupt Handling
3.5, Kémel Implementation of Processes
Scheduling (brs)
4.1, , Tatroduetion:
4.2, ' Schéduling Levels
4.2.1. Scheduling Objectives and Criteria
4.2.2 Quantum Size
4.3. _ Preemptive Versus No Preemptive Scheduling
4.4, — Scheduling techniques:
4.4.1. Priority Scheduling
44.2. Deadiine Scheduling
‘4.3, First-in-First-Out Scheduling
444. Round Robin Scheduling
4.4.5: Shortest-Job-Firsi{S1E) Scheduling4.46, Shortest-Romaining-Time(SRT) Scheduling
P27, Highest Response Ration-Next(HRN) Scheduting
t48, Maltlevel Feedback Queues
Memory Management 7 (6 hrs)
P s.1, . Introduction,
: $4.1. Storage Organization, Hierarchy and Management
5.1.2. Storage Allocation ;
£:1.3, Configvous versus Noncontiguous Storage Allocation
5/14. Logical and Physical Memory
5.2. Fragmentation
53. | Fixed Pattition Multiprogramming
5,4, | Vatiable Pattition Multiprogramming
5.5. |, Relocation and Protection
5.6. | Coalescing and. Compaction
5.7. i Virtual Memory,
577.3. Introduction
5.7.8. Thrashing
5.8. Page Replacement Algorithms
5.8.1. Optimal Page Replacement Algorithm
5.8.2. Not Recently Used Page Replacement Algorithm
5.83. First-In-Fisst-Out Algorithm
58.4. Second Chance Page Replacement Algorithm
5.8.5, Least Recently Used Replacement Algorithm
8.6. Clock Page Replacement Algorithm
58.7. Working Set Page Replacement Algorithm
5.8.8, WS Clock Page Replacement Algorithm
5.9. Segmentation
5.9.1. Implementation of Pure Segmentation
5.9.2. Segmentation with Paging
Tnpet/Ontpat Ghss)
6.1. Tntoduction
6.2. Principles of YO Hardware
621. WO Devices
622. Device Controllers
623. Memory-mapped VO
62.4. DMA (Direct Memory Access)
6.3, | Principles of VO Software
6.3.1. Goals of I/O Software
Br
ee3.2. Polled VO versus Interrupt Delvett 0
Character User Interface and Graphical User Interface
6.3.4. Goals of I/O Software
6.3.5. Device Drivers
6.3.6. Device independent I/O software
6.3.7. User Space VO'Software
64. . Disk
6.4.1. Disk hardware
4.2. Disk Scheduling
64.2.1, Seek Time
64.2.2. Transfer Time
[Link]. Disk Arm Scheduling Algorithms
6.4.3, RAID (Redundant Array of Laexpensive Disks)
64.4. RAM Disks
File Systems
7.1, | File Organization
7.1.1. Blocking and Buffering
. File Descriptor
. File Naming
File Structure
. File Types
. File Attributes
. File Operations
File Access Methods
7.2. Sharing
7.3. ACL (Access Control List)
7.4. — Directories
7.4.1. Directory Hierarchy
7.42. Directory Operations
73. le System Implementation
Contiguous Allocation
Ghr)
73.
7.5.2. Linked list Allocation
Ts T-nodes
7.6. Security and Multi-media files
Distributed Operating Systems ey bes)
8.1. Introduction
8.1.1, Advantages and Disadvantages of Distributed Operating System
8.1.2. Network Architecture
$.1.3. Hardware and Software Concepts
82. — Comimunication in Distributed. Systems
8.2.1. ATM (Asynchronous Transfer Mode)
. Clicnt-Server Model
RPC (Remote Frocedure Call)
Group Communication3.6. Processes and Processors in Distributed System
37, Clock Synchronization
8%, | Scheduling in Distributed System.
rudies . hrs)
* Ce ati ‘System: System Configurations, Filing and Disk Management,
Graphical Capabilities, Memory management.
Unix/Linux Operating System: File Systems and Disk Management, Filters, Pipelining,
‘Sockbts, Shell. Memory Management, Networking festure, Multiprocessing Feature.
‘Window 2000; File System and Disk management, Networking, Security.
AMOEBS: The System Architecture of Amoeba, Mesaciy, Process Management and
Commminication im AMOEBA
Implementation of Entex-Process Coinimunication Using Buflers
Implementation of Deadlock Prevention Algorithms
Device Programming
ex away
Text Books:
i. A.S, Tanenbaum, Operating systems, Design and Iniplementation, Prentice hall India.
2. HM. Dietel. An Introduction to Operating System, Addison Wesley
References: ,
L. AS. Tanenbaum, Modem Operating System, Second Edition, Prentice hall India.
2. W. Stallings, Operating Systems, Prentice ball India.POKHARA UNIVERSITY
Bache! Semester — Mall Year 22013
ee i Pull Marks: 100
Op * Pass Marks: 45
Time : Shrs.
Gunclidales are required to give their answers in their own words as far
ay practicable.
The figuures in the margin inelicate full marks.
Attempt all the questions.
a) Fxplain why operating system is considered Resource Manager and
as well asa Virtual Machine?
b) What is “Race Condition"? Provide two programming examples in
which multithreading provides beiter performance than a single —
threaded solution.
a) Differentiate between process and threads. Explain process state
{ransition diagram.
by What is deadlock
‘oidance?A pply it to the following example where
there are
€ processes (A to E) and four types of resources,
Resources are assigned as follows; A; (3,0,0) B: (0,1,0,0),C: (1,1,1,0),
D: (1101), 0,0)
‘The additional request are: A(1,1,0,1),B(0, 1, 1,.23,C (3,1,0,0) .D
(0.0, 1,0) Es (2,1,1,0). ¢ availability vector is (1,0,2,1). Determine
whether the request by A for one item of resource type 4 should be
eranied.
4) Explain in brict
handling (ELAM),
b) A set of proc
About context switching? Explain first level
| interrupt
ses with their [Link]
arrival times at the ready
ngth of their next CP
'U burst are belo
ime (in ms)Determine average-waiting time and average turn-around time using:
SIF, RR (time slice 3ms), STRF.
Or
Define scheduling. What are the criteria for scheduling? Explain real- time
scheduling algorithm.
a) What’ is page fault? Consider the following page reference string: 3
2,3,3.4,5,6,5,7,1,2,5,8,6,4,1. How many page faults would occur for
each of the following Page replacement algorithms assuming 3 page
Frames? !
i. LRU page replacement
ii. FIFO page replacement
iii, Optimal page replacement
iv. MFU page replacement
b) What is fragmentation? Given five Memory partitions of 100 KB, 7
500KB, 200 KB, 300 KB and 600 KB (in order), how would cach of
the first —fit, best- fit, and worst-fit algorithms place processes of 212
KB, 417 KB, 112 KB, and 426 Kb (in order)? Which algorithny makes
the most efficient use of memory?
a) Define DMA. How the processor is made aware that a DMA request 8
has been completed? IMlustrate
b) Compare the contrast between
virus and worm, Explain Access 7
Control List (ACL) and Access C
ontrol Matrix (ACM),
a) List out pros and cons of distributed s
Explain Flynn’s taxonomy of comput
stem over centralized system, 8
ler system,
Define binary and counting semaphore, Explain how semaphore solve
the producer consumer problem with the help of appropri
example?
b)
ate
Write short notes on any two:
a) Autoexec. bat and Config, sys files in MS-DOS
b). Software RAID
¢), Security in Windows 2000a)
POKHARA UNIVERSITY
jevel: Bachelor
programme: BE
Course: Operating System
Semester: Spring Year 2013
Full Marks: 100
Pass Marks: 45
Time : 3hrs,
Candidates are required to
as practicable.
The figures in the margin indicate full marks,
Alterupl all the. questions,
give their answers in their own words as far
Define Operating system. “Operating system as a resource manager
and as an extended machine” Clarify this statement with the help of
suitable example.
What is IPC? Mlustrate Producer-Consumer problem and solutions to
the above problem. Use necessary code prototype and figures.
Differentiate between thread and process. Also explain process state
trdnsition with suitable diagram,
Deline semaphore, Explain how semaphore solves the Dining
Philosopher problem with the help of appropriate algorithm?
What do you know about multithreading? Explain in brief about types
of multi-threaded model.
Ciive the structure of a Kernel, How Kernel mode and User mode are
different. Iustrate.
@ between Preemptive and Non preemptive scheduling,
bout Highest-Response-Ration-Next scheduling algorithm,
OR
D and E arrived at the service centre at
re of 9, 18, 3,15 and 12 respectively.
2 respectively with | being the
heduling algorithms, determine the
ermine the average system
Differen
Explail
Suppose five jobs A, B,
time [Link] have the running tir
Their psorities are 1, 3, 4,5 and
highest priority. For each of the sel
Mean process turnaround time. Also det
Waiting time for
SIF aug a Gard cert ws eee ale,
RR (quantum size 6) arET eBay craze
iii, Priority scheduling NCIT Collegeiv. STRF : :
b) Consider a swapping system in which memory consists of the
following holes in memory order: 10K, 20K, 18K, 7K, 9K, 12K and
15K. Which hole is for successive segment request of
i 12K
ii 10K
iii,» OK
Using first fit, best fit, worst fit and next fit,
4) Describe TLB (Translation Look aside Buffers) with a diagram.
b) Disk requests come into the disk driver for cylinders | 1, 21, 31, 1,41,
51,2, im that order. A seek takes 3 msec per cylinder moved. How
much seck time is needed for
i.
ii,
7
8
First come First server FCFS
Shortest Seek First Shortest Scek First (SSF) disk scheduling
algorithm
iii, The elevator algorithm for schedu:
Jing disk requests !
CSCAN (moving inward)
iv,
a) List out pros and cons of distributed system over centralized system. 7
Explain Flynn’s taxonomy of computer system,
b) Compare and contrast between; 8
i. Virus and Worm
ii, Access Control List (ACL) and Access ontrol’ Matrix
(ACM).
Write short notes on: (Any ¢wo) 2x5
a) System call
b) Security in UNIX
e) [Link] and [Link] files in MS-Dos
4) Remote procedure calls (RPC),POKHARA UNIVERSITY
juvek Bachelor Semester: Fall Year: 2014
programme Full Marks: 100
eaurse: Operating System Pass Marks: 45
Time + Shrs.
Llandidutes are required to give their answers in their own words as far
as is practicable.
The figures in the margin indicate full marks,
Avempt all the questions.
Define Operating System. Explain different services provided by
operating system,
Law and describe process state diagram, What types of operations
arc performed in a process?
Mo ygu feel deadlock is great enemy of computer system? If yes,
why? Also write protection mechanism for deadlock.
Wheii multiple processes need to cooperate, there is a choice between
emory and inter-process communication (IPC). Compare and
nirast these two techniques. What is the role of the operating system
Hxplain how the producer-consumer problem is relevant to an
operating system. Describe briefly the semaphore based solution to
ibis problem "
Consider following set of processes along with their burst time, arrival
lime and priorities, Calculate average waiting time and average
turnaround time using following scheduling.
‘ FCFS
Na> SUF,
iii, Priority (Preemptive)
iv. HRRN. z ;
Process | Arrival | Burst Priority
Time Time
A 0 3 ve oo
oe 8 6 4c 4 fd Ale
D 6 5 3
E 8 2 2
How many page faults occur for following reference strings for three
page frames?
7,0,1,2,0,3,0,4,2,3,0,3,2, 1,2,1,2,0,3
Using LRU, FIFO and Optimal page replacement algorithm.
b) Differentiate virtual page and a page frame. What is the difference
between LRU and NRU page replacement algorithms?
Disk request,come to the disk driver for cylinder 6, 8, 18, 16, 25, 38
and 36 in that order. A seek take Smsec per cylinder move, Haw much
seek time is needed for
i. FCFS
i Closest Cylinder Next
__C-Seah (Initially moving upward)
iv. Scan (Initially moving downward)
In all cases, the arm initially at cylinder 18. Also describe which one
is best algorithm and why?
5) Give a scenario where choosing a large file-system block size might
be a benefit. Give an example where it might be a hindrance.
a) Describe OSI layered architecture, How it is important in network
architecture of oper-ting system?
b) Describe the process Management scheme in either Linux or
Microsofi- Windows OS.
Write short notes on: (Any two)
a) Peterson’s Algorithm
b) Context Switching
c) Windows 2000.
a)POKHARA UNIVERSITY
Semester: Spring Year =: 2014
Full Marks: 100
Pass Marks; 45
Time : Shrs,
sare required to give thei i i
fs ir answers in their own ¥
uy practicable, aes
The figures in the margin indicawe full marks.
Auempl all the questions,
1
a) What are time sharing, parallel and real-time operating systems? 8
Discuss their characteristics,
b) De you think a process can exist without any state? Justify your view 7
with the-help of process state transition diagram and PCB.
4) Abarber has N chai
just one ol
in its waiting room and the hair-culting cabin has 8
ir to serve one customer at a time. If there are no customers
in the shop, the barber goes to sleep. When a customer arrives, the
following happens:
@ If there is other customer and the barber is sleeping, the customer
wakes up the barber
Ifthe barber is busy with other customer and at least one chair is
vacant in the waiting room, the customer occupies one chair in
the waiting room and waits for its turn
« If the barber is busy and no chair is vacant in the waiting room,
the customer goes away, without getting service. Write an
algorithm to coordinate the barber and the customer.
b) What is cooperative process threading? How does process differ with 7
thread’? Discuss at least one multithreading model with its advantages
and disadvantages
a) What is memory management? Explain memory hierarchy 5
b) Consider following set of processes along with their burst time, arrival 10
time and_ priorities. Calculate average waiting time and average
2 following scheduling algorithms.
turnaround time usin,iii, Priority (P-cemptive) f
iy, HRRN hs
“ Process | Arrival | Burst Priority
Time Time
0 a 5
5 Zh 8 4c]
c 4 4 1
D 6 5 3
E 8 2.) 2
F 3 4 I
4, a) Differentiate virtual page and a page frame. What is the difference
between LRU and NRU page replacement algorithms?
b) Suppose a disk drive has 5500 cylinders, numbered 0 to 5499. The drive 8
is currently serving a request at cylinder 2243 and the previous request
was at eylinder 1125. The queue of pending requests in FIFO order is
586, 1470, 1913, 1774, 5348, 1509, 5022, 1750, 130
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?
i. FCFS
ii. Closest Cylinder Next
iii. C-Scan (Initially moving upward)
iv. Scan (Initially moving downward)
5. a) What is distributed operating system? Explain advantages and 8
disadvantages cf distributed operating system,
b) Whatis the difference between absolute and relative path name ofa file? 7
What criteria should be used to decide which strategy? (Contiguous,
linked, indexed, allocation) is best utilized for a particular file?
'@ é
a) Describe the prozess management scheme in either Linux orMicrosoft- 7
Windows OS
b) Discuss the working principles and advantages of Direct Memory
Access
7, Write short notes on: (Any two) 2
a) File access methods
b) The Shell
©) Types of Kernel.a)
b).
a)
b)
a)
POKHARA UNIVERSITY
Level: Bachelor
Programme: BE
Course: Operating System
Semester: Fall Year 22015
Full Marks; 100
Pass Marks: 45
Time + Shrs.
Candidates are required to Bi
ve their answers in their own words as far
ay practicable,
The figures inthe margin indicate full marks
Auempt all the questions,
Define Batch System. How the disadvantages of Batch System are
overcome in Multi-programmed Operating System? Also describe
how Multi-programmed operating system is milestone in development
of operating system.
Draw and describe process state diagram. What types of operations
are performed in a process?
Consider following set of processes along with their burst time, arrival
time and priorities. Calculate average waiting time and average
-turnaround time using following scheduling. Also describe which one
is best algorithm and why.
i FCFS,
ii. Priority (Preemptive and Non-preemptive)
. PP(Quantum size=6ms)
Process CPU Burst Time Arrival Time Priority
PL 3 0 2
P2 14 1 1
P3 2 2 re)
pa 7 3 4
Define deadlock and its causes. Explain deadlock prevention methods.
Given five memory partitions of 100 KB, 500KB,200KB,300KB and
600KB (in order), how would the first-fit, best fit and worst-fit
algorithms place processes of 212KB,, 417KB,L12KB, and 426KB (in
order)? Which algorithm makes the most efficient use of memory?
Mustrate.b) Consider a disk queue with requests for /O to blocks on cylinders in
the order: 15, 25,68,142,64,90,187 and 215 there are 150 cylincets
numbered from 0-250 and the disk head starts at number [Link] is
‘the total distance that the disk arm moves. to satisfy. all the. pending
requests for each of the following disk scheduling algorithms?
i) FOFS”—s ii) SSTF iii). SCAN
a) Explain the reader's and writer's classical IPC Problem and its
solution
b) List out pros and cons of distributed system over centralized system.
Explain Flynn’s taxonomy of computer system.
a) Compare and contrast between virus and worm. Explain Access
Control List (ACL) and Access Control Matrix (ACM).
b) Describe the process Management scheme in either Linux or
Microsoit-windows OS.
a) Define Distributed System. List out advantages and disadvantages of
distributed system over centralized system.
5) Write the difference between logical and physical address Describe
about Coalescing and ‘Compaction with suitable examples
Write short notes. on: (Any two) ‘
a) Kernel
b) ATM
c) Windows 2000POKHARA UNIVERSITY
Level: Bachelor
Semester Spring Year ~
Frogriimne BE Full Marks : 100
Course: Operating System Time
Candidates are required to give their answers in their own words as far
as practicable,
The figures in the margin indicate full marks.
Attempt all the questions,
a) What is the difference between kernel mode and user mode? Why is
the difference important to an ‘operating system?
b} "OS is simply considered as Resource manager as well as Virtual
inachine", Why? Explain in your own words,
. a),Define process. Why different process states are essential in
multiprogramming? Justify with an example.
b) Why mutual exclusion is required in multiprogramming? Explain with
an example of an appropriate race condition case.
c) What is the difference between deadlock and starvation? What are the
Stratcgics used to solve the problem of deadlock?
3. a) What are the advantages and disadvantages of using the same
systemeall interface for manipulating both files and devices?
b) Consider the following set of processes, along with their burst time (in
milliseconds), arrival time and priorities. Calculate average waiting
time and average tumaround time using following scheduling, Also
describe which one is best algorithm and why.
he FCFS
ii. SJF
Priority (Preemptive)
RR (Quantum size=1ms)
“[Acrival Time __[ Burst Time Priori a
0.0 8 2
0.4 4 1
ay 1.0 1 2
Pq 00 sd
4. a) What is a TLB? How does the TLB map virtual and real addresses?
Explain with mapping diagram?
b) Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB
and 600 KB (in order), how would the first-fit, best fit and worst-fit
algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB
(in ordery? Which algorithm makes the most efficient use of memory?w
~
a) What is RAID? Explain Levels of RAID with suitable diagram.
b) What is a file? Explain different file allocation techniques in OS, -
. a) What is the distributed operating system? Explain Remote Procedure
Call (RPC) with the help of an appropriate figiire.
b) Why distributed system is growing rapidly than centralized systern?
Give reasons. What ate the advantages and disadvantages of a
distributed operating system?
- Write short notes on (Any Two):
a) Amoeba System Architecture
b). DOS
c) Device Controllers
ee)
2x5a)
b)
a)
b)
)
a)
b)
POKHARA UNIVERSITY
Semester: Fall
Year
+2016
Full Marks: 100
Pass Marks: 45
Time
+ Shrs.
Candidates are required to give their answers in their own words as far
as practicable.
The figures in the margin indicate full marks.
Attempt all the questions,
What is the difference between multitasking and multiprogramming?
List the essential properties for the Batch-oriented and time sharing
operating system.
Explain process control block (PCB) and process states in detail.
‘What are safe, unsafe states and deadlock? Explain banker's algorithm
ifor dead lock detection.
Define thread. Why it is called light weight process? Compare and
contrast between process and thread.
What do you mean by concurrent process? Describe any two methods
for process synchronization.
Schedule the following processes applying (Highest Response Ratio
Next) HRN scheduling algorithm. Assume that P1 is the first process
and processor is instantly available for processing.
Process PL P2 P3 P4_ PS
Arrival Time | lms | 2ms | 4ms | 7ms Oms
Service Time | _5ms ms ams | _7ms Sms
7 Find wailing time and turnaround time for each process and
Find the order of execution. :
ii, Change the arrival time of P4 and PS to 6ms find the
execution order.
Draw and des
How many P
ctibe memory hierarchy diagram. How virtual memory
ter system? Describe in detail.
increases the performance of
Securs
reference string for three frames:
comp!
for your algorithnr for the following,5.
6.
a)
b)
a)
b)
114,22,1,4, 2, 3,3, 5,5, 4
Using FIFO, Optimal, LRU, and LFU page replacement algorithm?
Distinguish between block oriented ané character oriented I/O
devices. Explain the various steps involved in DMA transfer.
Explain I-node and linked list allocation : based file system
implementation.
Define distributed operating system. Write about the issues that have
to be considered while designing Disuibuted OS.
What do you mean by context switching? Explain how context
switching is done. How context switching helps for
multiprogramming?
Write short notes on: (Any two)
ay
b)
c)
RPC(Remote Procedure Call)
RAID
Linux operating systema)
by
a)
by
“)
b)
a)
by
POKHARA UNIVERSITY
Level: Bachelor
Programme: BE Semester: Spring Year 2016
. - Operatit Full Marks: 100
Course? Operating System Pass Marks: 45
Time —: 3hrs.
Candidates are required to
as practicable,
The figures in the margin indicate Full marks. bd bed af
Attempt all the questions, 4 ad we emake
give their answers in their own words as far
What is an operating system? Explain the different major function of = 7
Operating System.
What is process? Illustrate and define the different state of process 8
with neat diagram.
Define deadlock and its causes. Explain deadlock prevention methods. 8
What is the relationship between Thread and Process? Multi: 7
programming (or multi-tasking) enables more than a single process to
apparently exccute simultaneously, How is this achieved on a
uniprocoessor?
Differentiate the role between kernel mode and user mode in 7
operating system.
Schedule the following processes applying following scheduling — 8
algorithm:
Process Burst Time
P, 15
P; 20
Py 4
Pa 9
Ps 7
JF and Round Robin (quantum = 4 mili seconds)
algorithm would give the minimum average waiting time?
“Optimal Page replacement algorithm have lesser page fault then the 7
FIFO Page repla ent”. [5 the above statement correct? Explain your
answer with proper examples. :
What is a ne How does the TLB map virtual and real addresses? 8
Explain with mapping diagram.
1a)
»)
b)
Consider a disk queue with requests for /O-to blocks on cylinders in
that order: 43, 79, 142, 56, 34 and 187. There are 200 cylinders
numbered from 0 - 199 and the disk head starts at number 100. we
is the total distance that the disk arm moves to satisfy all the pending
requests for each of the following disk scheduling’ algorithms?
i, “FCFS
SSTF
iii, SCAN
What is file system implementation? Explain Contiguous List and
Linked List file system implementations with their relative advantages
and disadvantages.
Define Network Architecture. Describe OSI layered architecture.
How distributed shared memory is different from message passing?
Explain process management technique in Linux,
Write short notes on: (Any two)
a)
b)
c)
File System in Windows 2000
Race Condition
Context Switching
v
~POKHARA UNIVERSITY
Level: Bachelor
Semester: Fall Year :2017
Programme: BE Full Marks: 100
Course: Operating System eas ec Aa
Time + Shr.
Candidates are required to give their answers in their own words as far
as practicable,
The figures in the margin indicate full marks,
Attempt all the questions,
a) Define system call, Explain Operating system as resource manager. 7
b) Explain process states with suitable diagram. Draw the queuing
diagram For 5 state process model,
a) What is Race Condition? What is the cause of race condition? Explain 7
TSL Solution for Race Condition.
b) Why do we need IPC? Explain about Peterson's algorithm. 8
a) Explain conditions for deadlock. Explain two phase locking. 7
b) , What do you mean by kernel? Explain the kernel implementation of 8
process.
4) Schedule the following processes applying following scheduling 8
algorithm:
Process Burst Time
PB 10
Pr 15
Pa a
Pa 10
Ps 415
P6 8
FCFS, SJF and Round Robin (quantum =3 mili seconds)
Which algorithm would give the minime™ average waiting time?
b) What is Page Fault? Given below is the references made to the = 7
following pages by a program: 0, 2,4, 1, 5, 14, 3, 0,3, 1 Show the
successive pages residing in the three frames using replacement
policy below. Also, state how many page faults will occur for
each of the Replacement policies.
i. FIFO Page Replacement
1ii, NRU Page Replacement
iii, Optimal Page Replacement y er Son
a) Explain Direct Mapping and Block Mapping Techniques? What is
TLB?
b) Consider a disk queue with requests for 1/0 to blocks on cylinders in 8
that order: 43, 79, 142, 56, 34 and 187. There are 200 cylinders
numbered from 0 - 199 and the disk head starts at number 100. What
is the total distance that the disk arm moves to satisfy all the pending
requests for each of the following disk scheduling algorithms?
i. FCFS
ii, SSTF
iii, SCAN
8) Define Contiguous List and Linked List file system implementations. 7
Explain ACL with the help of diugram.
b) Whatdo you mean by RPC? Explain
distributed OS.
Write short notes on: (Any twa)
a) File systems in Linux
b) ATM (Asynchronous Transfer Mode)
©) Unix
advantages and disadvantages of 8
2x5b)
2 a)
b)
b)
4 ay
' POKHARA UNIVERSITY
Level: Bachelor Semester: Spring Year 2017
programme: BE Full Marks: 100
Course: Operating System Pass Marks: 45
Time —: 3hrs.
Candidates are required to give their answers in their own words as far
as practicable.
The figures in the margin indicate full marks.
Attempt all the questions,
Define operating system. Explain monolithic and layered structure of
operating system.
Define process. Differentiate between process and program.
Explain difference between thread and process? Explain different
multithreading model?
What make message passing IPC as one among the best method of
IPC implementation? Explain with pseudo code details.
Explain necessary and sufficient condition for deadlock, Give an
algorithm for deadlock detection for a system with multiple resource
of same kind.
Consider the Dining Philosophers problem with n philosophers but
with n+1 forks; the extra fork is in the middle of the table and can be
used by any philosopher(but only by one of them at a time), Is
deadlock possible? Explain your answer.
Define context switching (kemel mode and user mode).
Consider 5 processes Pl, P2, P3, P4, and P5 which arrives at time 2,
6,4, 5 and Ovunits to the waiting queue. And burst time of processes
are s, 4, 6, 8, 4 units respectively. Find throughputs of the following
algorithins;
i. HRRN
Round Robin
ii, SRT
Define term thrashing and pre-paging. Explain Working set pape
replacement Algorithm with example.
Given below is the references made to the following pages by a
1: 4,3,5,1,6,3.4,0,3,2 Show — the
rogram: — 1,3,2:3,4,5,3,2,5,1,4,3,2,4,5593 bs 4
teashe pages residing in the four frames using: doa
policy below, Also, state how many page faults will occur for
each of the Replacement policies and calculate the fauit rate.
i. FIFO ‘ \
i, NRU i
iii, optimal
b) The disk track requests are: 123, 250, 298, 120, 13, 300 and 224.
Assume that the last request is at track 150 and the head is moving
towards track 0. Find out the total seek Time for each of the disk
scheduling algorithms below:
i. SSF
ii, C-SCAN
iii, FIFO
a) With help of necessary diagram, explain file system allocation
techniques.
b) Define Distributed Operating System. Explain the similarity and
dissimilarity between TCP/IP and OSI Network Architecture.
¢) Differentiate between Linux and UNIX.
Explain memory
management technique in Linux.
Write short notes on: (Any two)
a) Flynn Taxonomy
») Security in windows 2000
c) BMAPOKHARA UNIVERSITY
Level: Bachels? Semester: Fall Year : 2018
programme: BE Full Marks: 100
Course: Operating System Pass Marks: 45
Time —; Shrs.
'
Candidates are required to give their answers in their own words as far
as practicable.
The figures in the margin indicate full marks.
Auerpt ail the questions.
a)
b)
a)
b
5
»)
a)
What is an operating system? Explain the concept-“OS as a resource
manager and OS as an extended machine.”
What is the problem associated with sleep and wake up based
solution for achieving mutual exclusion? Explain how monitor
overcomes this problem?
Differentiate between deadlock and starvation, For resources type
with multiple instances, we can model resource allocation and
requests as a directed graph connecting processes and resources.
Explain the step involved in deadlock detection taking such graph as
an example
Define process. Explain process control block (PCB) and explain
process states and its transition,
What do you mean by thread? Differentiate between user level and
kernel level threads.
Explain the difference between internal and external fragmentation.
How external fragmentation can be combat, illustrate with example.
Consider the following set of processes that arrives at time 0, with
the length of the CPU burst given in milliseconds: Construct Gantt
chart and calculate average waiting time.
Process Burst Time PriorityRound Robin (quantum = 5)
Priority Scheduling (1 highest priority)
iii, = FCFS
iv. Shortest job first sp a0
d) How does DMA assist CPU in concurrent processing? Illustrate
with block diagram. ian
2) What is page fault? Consider the following page, reference strings:
1, 2;3,4, 2, 1,5, 6, 2, 1, 2; 337, 6, 3,2, 2.33 6. How many page
faults would occur for each of the following page replacement
algorithms assuming 3 pages a frame? In each case calculate fault
ratio.
i. FIFO page replacement
ii, LRU page replacement
iii, Optimal page replacement
b) How files and directories are stored in memory such that they can
be managed efficiently? Explain the approaches.
a) What RPC? Show the operation of RPC ina client server computing
environment taking an example and a necessary figure,
b) Explain about file and disk management in Windows 2000,
Write short notes on: (Any two)
a) Interrupt Handler
b) Autoexec. bat und Config. sys files in MS-DOS
©) Group Commurication
2x53.
a)
POKHARA UNIVERSITY
Level: Bae Semester: Spring Year 2018
Programme: BE Full Marks: 100
Course: Operating System Pass Marks: 45,
Time : Shrs.
Candidates are required to give their answers in their own words as far
as practicable.
The figures in the margin indicate full marks.
Antempt all the questions,
What are the main functions of operating, system? Discuss on the
different structures of operating system in brief.
What is a process control block? How are the states and transitions
associated with process? Illustrate using three state models.
What is a race condition and mutual exclusion? Show how mutual
exclusion can be achieved using TSL (Test and set Lock).
‘What is deadlock? Consider a system with four processes PO through
P3 and three resources types A,B,C. Resource type A has 8 instances,
B has 6 instances and type C has 4 instances. Suppose at time to
following snapshot of the system has been taken.
Allocation Matrix Required Matrix
Process | A B Cc Process _| A | B|C
PO 2: 1 1 PO 4 3 2
PI 2 1 [it PL 5 | 4/2
| P2 1 2, [le P2 6 }3 [2
re T | 1 | P3 > [2 [1
Use resource allocation graph to model the given system.
What is critical region? Write and explain Dekker's algorithm,
Consider the following set of information. Determine the average
rage tum-around time using FCFS, SJF
waiting time and ave
and IIRRN.
(Preemptive), RR (Quantum=
Process | acrival Time _| Service Time (Burst Time)
Ll PL ; . | 7. |
P2 2 Pr heeiens PR
ee ee B |gmentation. How
a) Differentiate between internal and external : ae
external fragmentation can be combat, illustrate w rag uae eens
b) Why does page fault accur? Consider ue se ee Haw rian
Strings: a, b, ¢, d, b, a, 2, fb .a, b,c, g, fc, ea eee
means woul occur for each of the following page ae
algorithms assuming 3 pages a frame? In each case calculate
ratio.
i. Second Chance page replacement
ii. LRU page replacement
iii, FIFO page replacement
3) What are the problems of programmed and interrupt driven VO
techniques? How does DMA solve these problems? Explain in detail.
b) What is Access control list (ACL) 2 Describe differci
implementation methods in brick. :
a) What are different netw:
* Explain clock synchronization technique in distri
5) _Deseribe in brief about che file system of windows and Linux. '
Write short notes on: (Any two) 2
a) Deadlock Detection and Recovery
b) Context Switching in Kermel
©) Segmentation with Paging
nt file sy&tem
ork architecture in Distributed System?
buted system,a)
b)
a)
b)
a)
b)
a)
b)
POKHARA UNIVERSITY
Level: Bachelor
Programme: BE
Course: Operating System
Semester: Fall Year +2019
Full Marks; 100
Pass Marks: 45
Time —: hrs,
Candidates are required to give their answers in their own words as far
ay practicable.
The figures in the margin indicate full marks.
Attempt all the questions.
Explain types of kemel with necessary diagrams
Differentiate Process and Threads, Draw five stage process state
diagram and explain each stage.
What is multi-threading? Explain different multi-threading model. What
is the biggest advantage of implementing threads in user space?
What are classical IPC Problems? Explain reader-writer problem.
Write and explain solution for producer consumer problem using
semaphore variables
hat are the necessary characteristics of dead lock? Explain deadlock
prevention and avoidance methods .
Draw a Gantt chart and find average turnaround time and waiting time
of the following process applying FCFS, STRF and round robin (with
quantum = 3) scheduling algorithm,
~~” Process Aa [Bc E |
‘Arrival Time(see) | 0 | 3 | 4 _ lo]
Burst Time(sec) | 6 | 3 | 6 a 2
Suppose that a disk drive has 200 cylinders, numbered 0 to 199, The
drive is currently serving a request at cylinuer 50, and previous request
was at cylinder 25. The queue of pending request is: 95, 180, 34, 119,
11, 123; 62, 64. Starting from the current head position, what is the total
distance (in cylinder) that the disk arm moves to satisfy all pending
request for FCFS, SSTF, SCAN and C-LOOK disk scheduling
algorithm.
Explain the difference between internal and external fragmentation. How
ntation can be combat, illustrate with example.
1
external fragme‘i ement
b) Describe the Amoeba System Architecture. How process manageme!
is done in Amoeba?
a) Define relative and absolute path. How file is implemented in a disk
using contiguous, linked list and indexed allocation strategy? Explain
with their merits and demerits?
Explain the term distributed operating system with its chi
advantages and disadvantages.
Write short notes on: (Any two)
a) File system in Unix and DOS
b) Deadlock Condition
c) RPC
b) aracteristics,4)
b)
a)
b)
bb
POKHARA UNIVERSITY
Level: Bachelor Semester: Spring Year 2019
Programme: BE Full Marks: 100
Course: Operating System Pass Marks: 45
Time : Shrs.
Candidates are required ta give their answers in their own words as far
ay practicable,
The figures in the margin indicate full marks
Attempt all the questions.
What are Systein Calls? Explain the types of System Calls. Explain
the sequence of System Calls for copying one file to a new file,
Explain the process state transition diagram used in \
multiprogramming environment. Describe the fields in a process
control block (PCB). What is switching overhead?
State Producer Consumer problem, Explain how to solve it. t
How can Mutual exclusion affect program performance? Describe 4
sleeping barber problem with pseudo codes.
Why is deadlock state more critical than starvation? Describe resource t
allucation graph with a deadlock, with a cycle but no deadlock.
Explain about the types of kemels. i
From the lollowing set of information, Find the average waiting time
und average turn-around time using FCFS, SJF, RR (Quantum = 3)
and HRRN.
Process:
Explain the sequence of events during remote procedure call using an 7
:ple; also explain why remote procedure call (RPC) doesn’ fit in
OS! model.a) Explain the concept of Thrashing. Suggest ways to prevent it.
b) Consider the following page reference strings: 1, 2, 3, 4, 2, 1. 5, 6, 2,
1,2, 3, 7,6. 3, 2, 1.2, 3, 6 How many page faults would occur for
each of the follewing page replacement algorithms assuming 3 pages
a frame? In each case calculate fault ratio,
i) Second Chance page replacement
ii) | LRU page replacement
iii) FIFO page replacement
a) Suppose a disk drive has 400 cylinders , numbered 0 to [Link] driver
is currently serving a request al cylinder 143 and previous request was
at cylinder 125 The queue of pending request in FIFO arder is. 86, 147,
312, 91, 177, 48, 309, 222, 175, 130. Starting from the current head
Position what is the total distance in cylinders that the disk to satisfy all
the pending request for each of the following disk scheduling
algorithms?
DSSTS ii) SCAN iii) C-SCAN
b) How files can be allocated using Linked list and I-Node method?
Describe using appropriate figures,
Write short notes on: (Any two)
a) ATM
b) Internal and External Fragmentation
©) HRN SchedulingPOKHARA UNIVERSITY ~~
Level: Bachelor ‘Semester: Fall Year 22021
Programme: BE Full Marks: 100
Course: Operating System Pass Marks: 45
Time : Shrs.
Candidates are required to give their answers in their own words as far
as practicable.
The figures in the margin indicute full marks.
Attempt all the questions.
a)
b)
a)
What is an operating System? Discuss the main advantage for an
operating system designer for using virtual machine architecture. Give
the main advantage for user.
‘Write advantages of threads over processes. How multiprocessor
system can be effectively utilized with threads? Explain with example.
What is test and set instruction? Explain producer-consumer problem
and algorithm for resolving it using monitor.
Consider the deadlock situation that could occur in the dining
philosophers’ problem when the philosophers obtain the chopstick one
at a time. Discuss how the four necessary conditions for deadlock
indeed hold in this setting. Discuss how deadlock could be avoided by
eliminating any one of the four conditions.
Write advantages of threads over processes. Explain the advantage of
multithreading.
Given the following information, draw the GANTT charts for
processor scheduling for HRRN, Preemptive Shortest Job First and
RR (Quantum=2). Also, find the average waiting time, average
turnaround time and average response time for all the cases.
Process
PI 0.0 7
Arrival Time Burst Time
P2 3.0 4
ae
P3 5.0 2
Pa 6.0 a 4a) What is thrashing” Consider the following page reference strings:
233a,[Link] 4,1. How many page faults would oceur for
each of the follow eplacement algorithms assuming 3 pages
frames?
LRU page replacement
FIFW page teplacement
iii, ‘Optumal page replacement
b) Define swapping. Explain contiguous and non-contiguous memory
allocation scheme with their advantages and disadvantages.
a) Suppose a disk drive has 2000 evlinders, numbered 0 to 1999. The
drive is currently serving a request at cylinder 134 and the previous
request was at cylinder 124. The queue of pending requests in FIFO
order js 86, 1470. 913, 1774. 948, 1509, 1022. 1750, 130
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 scheduli gorithms?
i) FCFS ii) SSTF iii) SCAN iv) CSCAN
What is file system implementation? Explain link list and i-node file
system implementations
b)
a) What is distributed operating system? Explain advantage of
distributed system over independent PC.
b) Explain file and disk management in LINUX.
‘Write short pote: an: (Any Dwar 2*5,
a) Context Switching
b) Internal vs Extemat Fragmentation
c) Multilevel feedback queues
8POKHARA UNIVERSITY
3 | Semester: Fall Year : 2022
roe ne BE Full Marks: 100
e ting System Pass Marks: 45
Course: Operating Sy‘ pee ee
Candidates are required to give their answers in their own words as far
as practicable,
The figures in the margin indicate full marks.
Attempt all the questions.
I. a) Define processes, Explain different operating system structures. 8
b) What is process control block? Describe the fields in a process control 7
block (PCB) with diagram.
2. a) Explain Producer Consumer problem in process synchronization and 7
give solutions to it using semaphores.
b). Describe Dining Philosophers Problem and show how deadlock
Occurs in it. Provide the solution to deadlock in Dining Philosophers
problem.
3. a) List out the conditions for deadlock, Explain deadlock modelling using 8
resource allocation graphs for multiple type Resources,
b) What is context switching? Explain it with an Appropriate diagram.
4. a) Consider the following set of processes that arrive attime 0, with the = 8
length of the CPU burst given in milliseconds. Construct the Gantt |
chart and calculate average waiting time.
Process Burst Time | Priority ;
PI 32 By |
P2 7 6 i
PS 6 2 | |
Pa 21 1
PS 6 4
Les 5 3by
a)
b
a
»)
i. HRRN
ii, RR (Quantum = 5)
ili. Priority Scheduling
iv, Shortest Job First (Preemptive)
List pros and cons of distributed system over centralized system.
Explain remote procedure call (RPC)
What is fragmentation? What are its types? How can the problems of
fragmentation be solved?
Consider the following page reference strings 7,0,1,2,0,3,0,4,2,4,0,3,2.
How many page faults would occur for each of the following page
replacement algorithm assuming 3 pages 4 frame? In each case
calculate fault ratio.
j, Second Chance Page replacement algorithm
ii, NRU
iii. Optimal Page replacement algorithm.
Suppose a disk drive has 200 tracks, numbered 0 to 199. The current
position of the R/W head is at track 60 and the previous request was at
track 45. The sequence of pending requests is 43,72, 150, 48, 85, 170,
190, 130. Starting from current position what is the total number of
track movements (distance) for the following disk scheduling
algorithms. .
i. SSTF ii, SCAN iii. C-LOOK
List the various file operations. Explain the I-nodes method of File
allocation.
Write short notes on: (Any two)
a)
b)
e)
File Systems and Disk management in LINUX
Security in Windows 2000.
RAID.
\)
Q