0% found this document useful (0 votes)
11 views20 pages

COURSEPACK Operating System Integrated-NEW (1)

The document outlines a course on Operating Systems, detailing its objectives, outcomes, and assessment methods. It covers fundamental concepts such as process management, memory management, and file systems, along with practical lab exercises to reinforce theoretical knowledge. The course is designed to enhance students' understanding of operating systems and their applications in real-world scenarios.

Uploaded by

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

COURSEPACK Operating System Integrated-NEW (1)

The document outlines a course on Operating Systems, detailing its objectives, outcomes, and assessment methods. It covers fundamental concepts such as process management, memory management, and file systems, along with practical lab exercises to reinforce theoretical knowledge. The course is designed to enhance students' understanding of operating systems and their applications in real-world scenarios.

Uploaded by

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

COURSEPACK

SCHEME
The scheme is an overview of work-integrated learning opportunities and gets students out into the
real world. This will give what a course entails.

Course Operating system Course Type Integrated


Title
Course R1UC301B Class BCA/B.SC
Code
Activity Credits Credit Total Number of Assessment in
Hours Classes per Semester Weightage
Lecture 3 3
Instruction Tutorial 0 0
CIE SEE

Self-study
delivery

Practical
Practical 1 2

Tutorial
Theory
Self-study 0 0

Total 4 5 45 00 30
0 50% 50
0 %
Course Dr. Deepak Kumar Panda Course Dr. Ashok Kumar Rai.
Lead Coordinator
Name Theory Practical
Course
Instructors Dr. Deepak Kumar Panda Dr. Deepak Kumar Panda
Ms. Shailja Ms. Shailja
Dr. Krishana-veer Singh Dr. Krishana-veer Singh
Dr. Amit Kumar (496) Dr. Amit Kumar (496)
Dr. Ashok Kumar Ray Dr. Ashok Kumar Ray
Dr. Upasana Dohare Dr. Upasana Dohare
Dr. Monika Jain Dr. Monika Jain
Dr. Varsha Kumari Singh Dr. Varsha Kumari Singh
Dr. Dhirendra Pratap Singh Dr. Dhirendra Pratap Singh
Dr. Kavita Saini Dr. Kavita Saini
Ms. Ashima Tyagi Ms. Ashima Tyagi
Ms. Kritika Sharma. Ms. Kritika Sharma.
Ms. Alisha Banga Ms. Alisha Banga
Mr. Anshuman Mr. Anshuman

This course will introduce the basic concepts involved in the design of an operating system. Students
will be made familiar to the different types of OS and its important modules like threads, process,
deadlock, memory management, file systems, synchronization primitives and exception handling.
The accompanying lab course is intended to give students an illustration of the concepts introduced
in the theory course.

PREREQUISITE COURSE

PREREQUISITE COURSE No
REQUIRED
If, yes please fill in the Details Prerequisite course code Prerequisite course name

COURSE OBJECTIVE
1. To provide the fundamental principle of operating systems and explores design aspects of
operating systems.
2. To understand the concepts of threads and process.
3. To understand how processes are synchronized and scheduled.
4. To understand what is deadlock and how to handle it if it occurs in system.
5. To understand different approaches to memory management.
6. To understand the structure and organization of the file system.

COURSE OUTCOMES (COs)


After the completion of the course, the student will be able to:

CO No. Course Outcomes


R1UC301B. Understand the definition of OS, what they do and how they are designed and
1 constructed.
R1UC301B. Apply and analyze process management algorithms for solving critical section
2 problem in concurrent processes
R1UC301B. Analyze the concepts of process synchronization and deadlock in operating systems
3 and apply various approaches to handle deadlocks.
R1UC301B. Apply and analyze the concepts of main memory management during process
4 execution and also discuss how the file system, mass storage and I/O are handled.

BLOOM’S LEVEL OF THE COURSE OUTCOMES


Bloom's taxonomy is a set of hierarchical models used for the classification of educational learning
objectives into levels of complexity and specificity. The learning domains are cognitive, affective and
psychomotor.
INTEGRATED

Remember Understand Apply Analyze Evaluate Create


CO. No.
KL1 KL 2 KL 3 KL 4 KL 5 KL 6
R1UC301B.1
R1UC301B.2
R1UC301B.3
R1UC301B.4

PROGRAM OUTCOMES (POs):


PO1: The program enhances analytical, managerial, communication and computing Application
skills besides inculcating the virtues of self-study.
PO2: Analyze and synthesis computing systems through quantitative and qualitative techniques.
PO3: Design and develop computer programs in the areas related to algorithm, web design,
networking and AI.
PO4: Inculcating essential skills as demanded by Indian and Global Software industries through
latest tools of learning. This also includes team-building skills, audio- visual presentations and
personality development programs.
PO5: To develop inter-twining competence in the field of Digital Marketing and Commerce,
Computing Skill and Computational tools.
PO6: To Develop practical skills to provide solutions to industry, society and business.
PO7: Understand environmental issues and lead a life with concerns for environment.
PO8: Apply ethical principles and commit to professional ethics and responsibilities and norms of
the computing science practice.
PO9: To make graduates understand cross cultural, societal, professional, legal and ethical issues
prevailing in industry.
PO10: Communicate effectively in both verbal and written form.
PO11: To apply standard software engineering practices and strategies in software project
development using open source programming environment to deliver a quality of product for
business success
PO12: Recognize the need for lifelong learning for continuous enhancement and up gradation of
technological changes in society.
PROGRAMME SPECIFIC OUTCOME (PSO):
The students of Computer Application shall:
PSO1: Have the ability to work with emerging technologies in computing requisite to Industry 4.0.
PSO2: Demonstrate application development skills learned through technical training and projects
to solve real world problems.
COURSE ARTICULATION MATRIX
The Course articulation matrix indicates the correlation between Course Outcomes and Program
Outcomes and their expected strength of mapping in three levels (low, medium, and high).
PO1

PO2

PO3

PO4

PO5

PO6

PO7

PO8

PO9

PO10

PO11

PO12

PSO1

PSO2

COs/ POs

R1UC301B.1 3 - - - - - - - - - 2 - - -
R1UC301B.2 3 - - 2 - 2 - - - - 2 - - -
R1UC301B.3 3 2 2 - 2 - - - - 2 - - -
R1UC301B.4 3 - - 2 - 2 - - - - 2 - - -
Note: 1-Low, 2-Medium, 3-High

COURSE ASSESSMENT

The course assessment patterns are the assessment tools used both in formative and summative
examinations.

CIE Total Marks


Final Marks
Type of Course (B) LAB Work@
MTE LAB EXAM *
CIE SEE CIE*0.5+SEE*0.5
+ Record

INTEGRATED 25 50 25 100 100 100

* Lab Work-15 marks + Lab Record-10 marks

* *Passing Criteria-30% of marks to be secured in the lab Exam conducted by two


examiners (one internal and one external)

COURSE CONTENT

THEORY

Introduction: Operating System and Function, Evolution of Operating System, System Software,
OS services and Components: Multitasking, Multiprogramming, Multiprocessing, Time Sharing,
Buffering, Spooling, Distributed OS.

Process Management: Concept of process and threads: Process states, Process management,
Critical Section, Problem, Semaphores, Classical Problems in Concurrency, Inter Processes
Communication, Process Generation,

Process Management: Process concepts: Process status, Process description, Performance Criteria,
Process Scheduling: Concepts, Scheduler organization, preemptive and non- preemptive scheduler
strategies, scheduling algorithms: FCFS, SJF, Priority Scheduling, Round Robin Scheduling,
Multiple Processor scheduling, Thread Concepts and Multiple threaded OS.

Process Synchronization and Deadlock: Process Co-operation, Concepts of IPC, Process


Synchronization, Synchronization Issues, Critical Section problem, Mutual exclusion Primitives and
Algorithms, Process Synchronization with semaphores, Deadlock Characterization, Prevention,
Avoidance and Detection.
Memory Management and File System: Paging, Segmentation Virtual memory, Overlays, Demand
paging, Performance of Demand paging, Virtual memory concepts, Page replacement algorithms,
frame allocation algorithms, Thrashing. File System: File Concept, File Organization and Access
Mechanism, File Directories, File Protection, File Sharing and File System Management.

I/O Management and Disk Management: I/O Devices and the Organization of I/O Function, I/O
Buffering, Disk I/O. Disk management: Disk Structure and Scheduling. File systems, and
operating system support for distributed systems. Protection and Security related issues. Case
studies of contemporary operating systems.

PRACTICAL
LIST OF EXPERIMENTS
1. Study of basic Commands in Linux Operating System
2. Shell programming using control statements
3. Shell programming using loops, patterns, expansions and substitutions
4. Write a Shell program to check the given number is even or odd.
5. Write a Shell program to swap the two integers.
6. Write a Shell program to find the factorial of a number.
7. Write programs using the fork, exec, getpid, exit system calls.
8. Write programs using the I/O system calls (open, read, write,wait,close etc).
9. Simulation of Linux commands (ls, grep etc.)
10. Writing programs to use inter process communication constructs (File sockets/ Shared memory)
11. Write program for thread creation and termination
12. Implementation of FCFS Scheduling Algorithms.
13. Implementation of SJF Scheduling Algorithms.
14. Implementation of RR Scheduling Algorithms.
15. Implementation of FIFO Page Replacement Algorithms.
16. Implementation of First Fit memory allocation algorithms.
17. Implementation of Best Fit memory allocation algorithms

LESSON PLAN FOR COMPREHENSIVE COURSES


FOR THEORY: 15 weeks * 3 Hours = 45 Classes) (1credit = 1Lecture Hour)

L- Topic for Delivery Skills Competen


No cy
1 Operating System and Understands different
Function types of operating system
2 Evolution of Operating and its components
System
3 System Software Students
4 OS services and Components can able to
simulate
5 Multitasking,
Linux
Multiprogramming
commands
6 Multiprocessing, Time
Sharing
7 Buffering, Spooling,
Distributed OS
8 Concept of process and
threads
9 Process states, Process
management Students
10 Critical Section Problem Understand process and can able to
11 Semaphores handling of number of handle
processes at same time large
12 Classical Problems in
using process scheduling. number of
Concurrency
processes
13 Dining philosopher problem
at same
with semaphore
time.
14 Inter Processes
Communication
15 Process Generation
16 Process Scheduling

17 Scheduling Concept
18 CPU scheduling
19 Performance Criteria of Understand and implement
Scheduling Algorithm the operation in operating Students
20 scheduling algorithms system using scheduling can able to
Without deadlock. schedule
21 Preemptive scheduling
multiple
algorithms
process at
22 Non- preemptive scheduling
same time
algorithms
without
23 Multiprocessor Scheduling any
24 Deadlock: System Model deadlock.
25 Deadlock Characterization
26 Prevention, Avoidance and
Detection
27 Deadlock detection algorithm
28 Memory partitioning understand and implement Students
29 Swapping, Paging the concept of memory can able to
30 Segmentation Virtual management, paging and allocate
memory: Overlays segmentation memory
31 Demand paging for
32 Performance of Demand understand and implement different
paging the concept of page process
33 Virtual memory concepts replacement algorithm using
allocation
34 Page replacement algorithms
algorithms.
35 Allocation algorithms
36 Example OS : Linux
37 I/O Devices and The
Organization of I/O Function understand and analyses Students
38 I/O Buffering, Disk I/O, the concept of Disk I/O, can able to
39 Operating System Design file organization organized
Issues files in
40 File System: File Concept directories.
41 File Organization and Access
Mechanism
42 File Directories
43 File Protection
44 File Sharing
45 Implementation Issues

Lesson Plan for Practical


FOR PRACTICAL: 15 weeks * 2Hours = 30 Hours lab sessions (1 credit = 2 lab hours)

L Topic for Delivery Practical Plan Skill Competency


-
N
o
1 The online tool Visual Student will be able to
The student will
Study of basic
Paradigm will be explored run Visual Paradigm
able to use
Commands in Linux
by students for its for executing different
different
Operating System
functioning. commands commands.
2 The students will explore The student will be
The student will
Shell programming control statement able to execute
be able to use
using control commands. command. control
statements statement in any
given problem.
3 Shell programming The student will study the The student will learn The student will
using loops and different loops and loops, patterns. apply all
patterns patterns. concepts for any
4 problem.
Shell programming
using expansions and
substitutions.
5 Write programs using The student will study the The student will learn The student will
the following system different system call. system calls. able to apply
calls (fork, exec). system calls
6 Write programs using
the following system
calls (getpid, exit).
7 Write programs using
the following system
calls (wait, close).
8
Write programs using
the following system
calls (stat, opendir,
readdir).
9 Write programs using
the I/O system calls
(open, read, write,
etc).
10
Simulation of Linux
commands (ls, grep
etc.)

11 Write a Shell program


to check the given
number is even or odd
12
Write a Shell program
to swap the two
integers
13 Write a Shell program
to check the given
number is even or odd
14 Write a Shell program
to find the factorial of
a number
15 Write a Shell program
to create a child
process
Implementation of The students will study The students will learn The students
16 CPU Scheduling different CPU scheduling different CPU will able to use
Algorithms (FCFS). algorithms. scheduling algorithms. different CPU
scheduling
Implementation of algorithms for
17 CPU Scheduling different
Algorithms (SJF). process.
Implementation of
18 CPU Scheduling
Algorithms (RR).
Implementation of
19 CPU Scheduling
Algorithms ( Priorty).
Implementation of The students will study The students will learn The students
20 Page Replacement different Page different Page will able to use
Algorithms (LRU). Replacement Algorithms. Replacement different Page
Algorithms. Replacement
Implementation of Algorithms for
21 Page Replacement different process
Algorithms (OPT).
Implementation of
22 Page Replacement
Algorithms (FIFO).
23 Implementation of The students will study The students will learn The students
memory allocation different memory different memory will able to use
algorithms (First Fit) allocation Algorithms. allocation Algorithms. different
memory
24 Implementation of
memory allocation
algorithms (Best Fit)
25 Implementation of
memory allocation
algorithms (Worst Fit)

26 Implement the The students will study The students will learn The student will
Producer – Consumer semaphore algorithm. semaphore algorithm. able to
problem using implement
semaphores. problem using
semaphore.

27 Implement the Dining


Philospher problem
using semaphores
28 The students will study The student will learn The student will
simulation concept. how to simulate the able to
Simulation of Shared
shared memory. implement the
Memory Concept.
simulation
concept of
shared memory.
29 The students will study The student will learn The student will
deadlock and detection about concept of able to
Implementation of algorithm. banker’s algorithm for implement
bankers Algorithm. deadlock detection. banker’s
algorithm for
deadlock
detection.
The students will study The students will learn The student will
Implementation Disk disk scheduling algorithm. disk scheduling able to
30 Scheduling algorithm implement disk
Algorithms scheduling
algorithm.

BIBLIOGRAPHY

Text Books:
1. Abraham Silberschatz, Peter Baer Galvin and Greg Gagne, “Operating System Concepts”,
9th Edition, John Wiley and Sons Inc., 2012.

Reference Books:
1. William Stallings, “Operating Systems – Internals and Design Principles”, 7th Edition,
Prentice Hall, 2011.
2. Andrew S. Tanenbaum, “Modern Operating Systems”, Second Edition, Addison Wesley,
2001.
3. Charles Crowley, “Operating Systems: A Design-Oriented Approach”, Tata McGraw
HillEducation”, 1996.
4. D M Dhamdhere, “Operating Systems: A Concept-Based Approach”, Second Edition,
TataMcGraw-Hill Education, 2007. 5.

List of NPTEL/MOOCS/SWAYAM/Courses/Video

1. Coursera - https://www.coursera.org/learn/os-power-user
2. http://nptel.ac.in/
3. Udemy - https://www.udemy.com/courses/it-and-software/operating-systems/
4. Udacity: https://eu.udacity.com/course/introduction-to-operating-systems--ud923

Webliography:
1. https://www.tutorialspoint.com/operating_system/index.htm
2. https://www.javatpoint.com/operating-system.
3. https://www.studytonight.com/operating-system/

PROBLEM-BASED LEARNING

Exercises in Problem-based Learning (Assignments) (Min 45 Problems*)

S. Problem KL
No.
1 Explain FCFS scheduling algorithm. Find the average turnaround time and K1
average waiting time for the processes given below. Process CPU burst time (in
ms)
Process Burst Time
P1 24
P2 3
P3 3
2 Find the average turnaround time and average waiting time for the processes K2
given in the table below using SJF Non preemptive algorithm. Process CPU burst
time (in ms)

Process Burst Time


P1 6
P2 8
P3 7
P4 3
3 Find the average turnaround time and average waiting time for the processes K2
given in the table below using SJF preemptive and Non- preemptive algorithm.
Process CPU burst time and arrival time given in( ms). Draw the Gantt Chart.

Process Arrival Time Burst Time


P1 0 8
P2 1 4
P3 2 9
P4 3 5
4 Consider the following set of processes, assumed to have arrived at time 0 K1
in the order P1, P2…P5, with the length of the CPU burst given in
milliseconds:
Process Burst Time Priority
P1 10 3
P2 1 1
P3 2 4
P4 1 5
P5 5 2
Draw the Gantt chart to schedule the process. find out the average waiting
time and average turn around time using priority scheduling assuming 1
has highest priority.

5 Consider the following set of processes that arrive at time 0, with the K2
length of the CPU burst given in milliseconds. If time quantum is 4ms
then draw the Gantt chat and find the average waiting time, average
turnaround time using Round Robin Scheduling Algorithm.
Process BurstTime
P1 24
P2 3
P3 3

6 For the following set of process find the average waiting time using Gantt chart K2
for
i> SJF Scheduling.
ii> Priority scheduling
process Burst time Priority
p1 5 5
p2 3 4
p3 8 3
p4 2 1
p5 1 2
The process has arrived in the order p2, p1, p4, p3 and p5.
7 For the following set of processes, find the average waiting K2
time & average turnaround time using GANTT Chart for
I > FCFS
II> SJF preemptive.
III> SJF non-preemptive.
Process Arrival time (in sec) Burst Time
P1 0 4
P2 1 2
P3 2 5
P4 3 4
8 Consider the FCFSand RR (quantum = 10 milliseconds) scheduling K3
algorithms for this set of processes. Which algorithm would give the
minimum average waiting time?
Proces Burst
s Time
P1 10
P2 29
P3 3
P4 7
P5 12
9 Suppose that the following processes arrive for execution at the K2
times indicated. Each process will run for the amount of time
listed. In answering the questions, use non -preemptive
scheduling, and base all decisions on the information you have at
the time the decision must be made.
-
Proces Arrival Time Burst
s Time
P1 0.0 8
P2 0.4 4
P3 1.0 1
a) What is the average turnaround time for these processes with the
FCFS scheduling algorithm?
b) What is the average turnaround time for these processes with the SJF
scheduling algorithm?

10 Consider the following set of processes, with the length of the CPU K2
burst given in milliseconds:

Proces Burst Priority


s Time
P1 2 2
P2 1 1
P3 8 4
P4 4 2
P5 5 3

The processes are assumed to have arrived in the order P1, P2, P3,
P4, P5, all at time 0.
Draw four Gantt charts that illustrate the execution of these
processes using the following scheduling algorithms: FCFS, SJF,
non-preemptive priority (a larger priority number implies a higher
priority), and RR (quantum = 2).
What is the turnaround time of each process for each of the
scheduling algorithms in part a?
What is the waiting time of each process for each of these
scheduling algorithms?
Which of the algorithms results in the minimum average waiting
time (over all processes)?

11 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 the order p1, p2, p3, p4, p5 all at
time 0.
a) Draw four Gantt charts illustrating the execution of these processes using
FCFS, SJF, anon pre-emptive priority (a smaller priority number implies a
higher priority) and RR (quantum=1) scheduling.
b) What is the turnaround time of each process for each of the
scheduling algorithms in part?
What is the waiting time of each process for each of the scheduling
algorithms in part? Which of the schedules in part a result in the minimal
average waiting time?
12 Consider the following set of processes with their arrival and burst times as
shown Process A.T B.T
P0 0 10HR
P1 0 05HR
P2 1 02HR
P3 2 01HR
Compute the turnaround time and waiting time of each job using the following
scheduling algorithms.
a. FCFS
b. SJF
c. SJF PREEMPTIVE.
14 Five batch jobs A, B, C, D and E arrive at a computer at almost at the same
time. They have estimated running times of 10,6,2,4 and 8 minutes. Their
priorities are 3,5,2,1 and 4 respectively, with 5 being the highest priority. For
each of the following scheduling algorithm determine the turnaround time of
each process and waiting time of each process. Ignore process switching overhead.
Mention which algorithm results in minimal average waiting time.
Round Robin
Priority scheduling
First come first served
Shortest job first.
For case i) assume that system is multiprocessing and each job gets its fair
share of the CPU. (Time quantum 2 minutes0. For cases (ii), (iii) and (iv)
assume that only one job runs at a time, until it finishes. All jobs are
completely CPU bound.
12 Consider the following set of Processes, with the length of CPU burst in
milliseconds.
Process PI P2 P3 P4 P5
Arrival time 0 2 3 6 3
Burst time 10 12 14 16 5
Draw a Gantt chart that illustrates the execution of these processes using the
preemptive shortest job first (SJF) algorithm. Hence find the average waiting
time. Draw a Gantt chart that illustrate the execution of these processes
using preemptive priority scheduling algorithm. Given priority of each
process is PI = 4, P2=3, P3=5, P4= 1 and P5= 1. Also find the average waiting
time
15 K2

a. Find if the system is in a deadlock state otherwise find a safe sequence.


16 K1

Find if the system is in a deadlock state otherwise find a safe sequence.

17
K1

a. find the system is in a deadlock state otherwise find a safe sequence


18 Given 3 processes A,B and C, three resources x,y and z and following events,
K1
a. A requests x ii) A requests y iii) B requests y iv) B requests z
v) C requests z vi) C requests x vii) C requests y
Assume that requested resources should always be allocated to the request
process if it is available. Draw the resource allocation graph for the sequences.
And also mention whether it is a deadlock? If it is, how to recover the deadlock.
19 consider a system with five processes P0 through P4 and three
resource types A, B, and C. Resource type A has ten instances,
resource type B has five instances, and resource type C has seven
instances. Suppose that, at time T0, the following snapshot of the
system has been taken:
Allocatio Max Availabl
n e
ABC ABC A BC
P0 010 753 332
P1 2 0 0 3 2 2
P2 3 0 2 9 0 2
P3 2 1 1 2 2 2
P4 0 0 2 4 3 3
a. What is the content of the matrix Need?
b. Is the system in a safe state?
c. If a request from process P1 arrives for (1,0,2), can the request
be granted
immediately?

20
K3

Consider the following snapshot of a system:


Allocatio Max Availabl
n e
ABCD ABCD ABCD
P0 0012 0012 1520
P1 1000 1750
P2 1354 2356
P3 0632 0652
P4 0014 0656
Answer the following questions using the banker’s algorithm:
a. What is the content of the matrix Need?
b. Is the system in a safe state?
c. If a request from process P1 arrives for (0,4,2,0), can the request be granted
immediately?

21 Consider the following snapshot of a system: K3


Allocatio Max
n
ABCD ABCD
P0 3014 5117
P1 2210 3211
P2 3121 3321
P3 0510 4612
P4 4212 6325
Using the banker’s algorithm, determine whether or not each of the following states
is unsafe. If the state is safe, illustrate the order in which the processes may
Otherwise, illustrate why the state is unsafe.
a. Available = (0, 3, 0, 1)
b. Available = (1, 0, 0, 2)
22 Consider the following snapshot of a system: K3
Allocatio Max Availabl
n e
ABCD ABCD ABCD
P0 2001 4212 3321
P1 3121 5252
P2 2103 2316
P3 1312 1424
P4 1432 3665

Answer the following questions using the banker’s algorithm:


a. Illustrate that the system is in a safe state by demonstrating
an order in which the processes may complete.
b. If a request from process P1 arrives for (1, 1, 0, 0), can the
request be granted immediately?
If a request from process P4 arrives for (0, 0, 2, 0), can the request be
granted
23 Consider the version of the dining-philosophers problem in which the chopsticks
K2
are placed at the center of the table and any two of them can be used by a
philosopher. Assume that requests for chopsticks are made one at a time.
Describe a simple rule for determining whether a particular request can be
satisfied without causing deadlock given the current allocation of chopsticks to
philosophers.
24 Consider a system consisting of m resources of the same type being shared by K3
n processes. A process can request or release only one resource at a time.
Show that the system is deadlock free if the following two conditions hold:
a) The maximum need of each process is between one resource and
m resources.
b) The sum of all maximum needs is less than m + n.
25 Can a system detect that some of its processes are starving? If you K4
answer “yes,” explain how it can. If you answer “no,” explain how
the system can deal with the starvation problem.

26 Why are page sizes always powers of 2? K3


27 Consider a logical address space of 64 pages of 1,024 words each, K3
mapped onto a physical memory of 32 frames.
a. How many bits are there in the logical address?
b. How many bits are there in the physical address?

28 Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, K2
and 125 KB (in order), how would the first-fit, best-fit, and worst-fit
algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and
375 KB (in order)? Rank the algorithms in terms of how efficiently they use
memory.
29 Memory partitions of 100kb,500 kb,200 kb,300kb,600 kb is available. How
would best fit, worst fit, first fit algorithm to place processes 212,417,112,426 in K2
order. Which is the best algorithm?
30 Consider the reference stream 1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6. How K2
many page faults while using FCFS and LRU using 2 frames?
31 What is virtual memory? Explain Suppose we have a demand paged memory. K4
The page table is held in registers. it takes 8ms to service a page fault if an
empty page is available or the replaced page is not modified, and 20ms if the
replaced page is modified. memory access time is 100ns. Assume that the page
to be replaced is modified 70% of the time. what is the maximum acceptable
page fault rate for an effective access time of no more than 200ns?
32 Describe the LRU page replacement algorithm, assuming there are 3 frames and K2
the page reference string is 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1. Find the
number of page faults.
33 How many page faults occur for LRU algorithm for the following K1
reference string with four-page frames?
1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2.

34 Consider the following page reference string K2


1,2,3,4,2,1,5,6,2,1,2,3,7,6,3,2,1,2,3,6
Find out the number of page faults if there are 4-page frames, using the
following page replacement algorithm i) LRU ii) FIFO iii) Optimal
35 Suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. the drive K3
currently services a request at cylinder 143, and the previous request was at
cylinder 125. the queue of pending request in FIFO order is
86,1470,913,1774,948,1509,1022,1750,130 Starting from the current position,
what is the total distance (in cylinders) that the disk arm moves to satisfy all
pending requests, for each of the following algorithms i) FCFS ii) SSFT iii)
SCAN iv) LOOK v) C-SCAN.
36 The queue of requests in FIFO is 86,147,91,177,94,150,102,175,130 What is the K2
total head movement needed to satisfy the requests for the following Scheduling
algorithms FCFS, SJF, SCAN, LOOK, C-SCAN
37 The available space list of a K3
computer memory is specified as
follows: Start address block
address in words
100 50
200 150
450 600
1200 400
Determine the available space list after allocating the space for the stream of
requests consisting of the following block sizes:
25,100,250,200,100,150
i) FIRST FIT
ii) BEST FIT
and iii) WORST FIT algorithms.
38 Consider a logical address space of 256 pages with a 4- KB page K3
size, mapped onto a physical memory of 64 frames.

a. How many bits are required in the logical address?


b. How many bits are required in the physical
address?

39 A process references 5 pages A, B, C, D, E in the following order K2


A, B, C, D, A, E, B, C, E, assuming that the replacement algorithm
is LRU and FIFO, find out the number of page faults during the
sequence of references, starting with an empty main
memory with 3 frames.
40 Suppose that the head of moving head disk with 200 tracks numbered 0 to K3
199 is currently serving the request at track 143 and has just finished a
request at track 125. If the queue request is kept in FIFO order, 86, 147, 91,
177, 94, 150, 102, 175, 130. What is the total head movement to satisfy these
requests for i) FCFS II) SSTF disk scheduling algorithm.
41 Consider the following page reference string 7,0, 1,2,0,3,0,4,2,3,0,3,2, 1,2,0, 1, 7, K2
0, 1. How many page faults would occur for FIFO page replacement algorithm,
assuming three frames?
42 Given memory partitions of 100 K, 500 K, 200 K, 300 K and 600 K (in order) how K2
Would each of the first fit, best fit and worst fit algorithms work place processes
of 212 K, 417K, 112 K and 426 K (in order)? Which algorithm makes the most
efficient use of memory?
43 Consider the following page reference string: K2
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 the following replacement
algorithms, assuming one, two, three, four, five, six, and seven
frames? Remember that all frames are initially empty, so your first
unique pages will cost one fault each.
1.LRU replacement
2.FIFO replacement
3.Optimal replacement

44 You have devised a new page-replacement algorithm that you think K2


may be optimal. In some contorted test cases, Belady’s anomaly
occurs. Is the new algorithm optimal? Explain your answer.

45 Consider the following page reference string: K2

7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0, 1.
Assuming demand paging with three frames, how many page faults
would occur for the following replacement algorithms?
1.LRU replacement
2.FIFO replacement
3.Optimal replacement
Teaching Learning Methods

Proposed Assessment
Course Name Course Code CO/ COs Justification
TLMs Rubrics

Numericals/ Correctness of
Problem CO2, Questions are Solutions,
Operating
R1UC301B based CO3, provided to assess Application of
System.
TLMs CO4 the Cognitive level Concepts,
of students Complete Solutions

Students get better


understandings of
CO1,
different type of OS Data and Facts,
Operating CO2,
R1UC301B Case Study their structures, Query Satisfaction,
System. CO3,
About the processes, Presentation
CO4
Memory
management.

(Course Lead) (Program Chair) (HoD SCAT) (Dean,


SCAT)

You might also like