AP OS(24-25)
AP OS(24-25)
For
“Operating System”
Presented by
Swathi Tamma
Assistant. professor
Department of
Information Technology
S.NO CONTENT
(1) - Preamble/Introduction
(2) - Prerequisites
(3) - Objectives and Outcomes
(4) - Syllabus
1. JNTU/R22-CMREC
2. GATE
3. IES
(5) - List of Expert Details (Local/National/International
with Contact details/Profile link/Blogs/their research
Contribution towards the subject)
(6) - Journals with min 5 ref paper for literature study
(7) - Subject -Lesson plan
(8) - Suggested Books (prescribed and References)
(9) - Websites for self-learning Resources like
www.geeksforgeeks.org, www.schools.com, Coursera,edX,
Udemy, Khan Academy, NPTEL etc along Registration
procedures)
(10) - Question Banks
1. JNTUH/Model papers
2.GATE
(11) - Two case study presentations with Project /
Product/ Model /prototypes/ Industrial applications.
(12) - Assignment Question/Innovative Assignments sets.
(13) - List of topics for students Seminars with Guidelines
(14) - STEP/Course material in softcopy
(15) - Expert Lectures with topics &Schedules (if any)
(1) Preamble/Introduction: -
Introduction to Operating Systems is a graduate-level introductory course. This course teaches the basic
operating system abstractions, mechanisms, and their implementations. The core of the course contains
concurrent programming (threads and synchronization), inter process communication, and an
introduction to distributed operating systems.
(2) Prerequisites: -
1. A course on “Computer Programming and Data Structures”.
2. A course on “Computer Organization and Architecture”.
(3) Objectives: -
Course Outcomes: -
Will be able to control access to a computer and the files that may be shared Demonstrate the
knowledge of the components of computer and their respective roles in computing.
Ability to recognize and resolve user problems with standard operating environments.
Gain practical knowledge of how programming languages, operating systems, and
architectures interact and how to use each effectively.
(4) 1. Syllabus-Autonomous: -
UNIT – I
Operating System - Introduction, Structures - Simple Batch, Multiprogrammed, Time- shared,
Personal Computer, Parallel, Distributed Systems, Real-Time Systems, System components, Operating
System services, System Calls.
UNIT – II
Process and CPU Scheduling - Process concepts and scheduling, Operations on processes,
Cooperating Processes, Threads, and Interposes Communication, Scheduling Criteria, Scheduling
Algorithms, Multiple -Processor Scheduling.
System call interface for process management-fork, exit, wait, waitpid, exec.
UNIT – III
Deadlocks - System Model, Deadlocks Characterization, Methods for Handling Deadlocks, Deadlock
Prevention, Deadlock Avoidance, Deadlock Detection, and Recovery from Deadlock Process
Management and Synchronization - The Critical Section Problem, Synchronization Hardware,
Semaphores, and Classical Problems of Synchronization, Critical Regions, Monitors Interprocess
Communication Mechanisms: IPC between processes on a single computer system, IPC between
processes on different systems, using pipes, FIFOs, message queues, shared memory.
UNIT – IV
Memory Management and Virtual Memory - Logical versus Physical Address Space, Swapping,
Contiguous Allocation, Paging, Segmentation, Segmentation with Paging, Demand Paging, Page
Replacement, Page Replacement Algorithms.
UNIT – V File System Interface and Operations -Access methods, Directory Structure, Protection,
File System Structure, Allocation methods, Free-space Management. Usages of open, create, read,
write, close, lseek, stat, ioctl system calls.
2. GATE: -
UNIT-1
SYSTEM CALLS
UNIT-2
SCHEDULING ALGORTHIMS
UNIT-3
DEAD LOCKS, SEMAPHORES, BANKERS ALGORITHM
UNIT-4
PAGE REPLACEMENT ALGORITHMS
3. IES:-
Not Applicable
(5) List of Expert Details:-
Inter National:
National:
1. Dr.C. Mala, Professor Room No.:203, Department of Computer Science and
Engineering,National Institute of Technology, Tiruchirapalli.
Email:. [email protected]
2. Dr. Ramalingaswamy Cheruku, Assistant Professor - Computer Science and
Engineering Department, NITW,[email protected] .contact No: 9573827143
Local:
1. Dr. A PrasanthRao, Associate Professor, Information Technology, Anurag
University, Hyderabad [email protected] . contact No:9490232922
2. Dr Raja shekar, professor,CSE VNRVJIET Hyderabad, Email: [email protected].
9849296429
(6) JOURNALS: -
INTERNATIONAL
1. Distributed Operating System and Scheduling for MPSoC, Ali Ahmadinia.
http://www.hpdc.org/2017/posters/poster_files/poster8.pdf
2. Operating System and Virtualization Identification Without System Calls, Jason L. Wright.
http://www.thought.net/papers/wright-whereami-paper.pdf
6 L10 T1 M1/M2
System components
UNIT – II
UNIT-III
System Model, Deadlocks
17 L25-L26 T1,R5 M1/M2
Characterization
Methods for
18 L27-L28 T1 M1/M2
Handling
Deadlocks
Deadlock Prevention, Deadlock L29 T1,R2
19 M1/M2
Avoidance
Deadlock Detection, and
20 L30 T1 M1/M2
Recovery from
Deadlock
Process Management and
22 L33 T1 M1/M2
Synchronization Hardware
UNIT-IV
Logical versus Physical L42-L43
28 T1,R3 M1/M2
Address Space,
Swapping,
UNIT –V
T1. Operating System Principles- Abraham Silberchatz, Peter B. Galvin, Greg Gagne 7th Edition,
John Wiley
T2. Advanced programming in the UNIX environment, W.R. Stevens, Pearson education.
REFERENCE BOOKS:
R1. Operating Systems – Internals and Design Principles Stallings, Fifth Edition–2005, Pearson
Education/PHI
R2. Operating System A Design Approach- Crowley, TMH.
R3. Modern Operating Systems, Andrew S. Tanenbaum 2nd edition, Pearson/PHI
R4. UNIX programming environment, Kernighan and Pike, PHI/ Pearson Education
R5. UNIX Internals -The New Frontiers, U. Vahalia, Pearson Education.
SUBJECTIVE QUESTIONS
UNIT –II
SUBJECTIVE QUESTIONS
UNIT-III
1. Explain any one technique in which a process is allocated memory wherever it is available.
2. Explain about segmentation.
3. a) What is memory. How memory is organized.
b) Write about the typical instruction cycle.
4. What are logical address and physical address?
5. Explain all the strategies involved in deadlock detection and how it is recovered
6. a) Three processes share 4 resource units that can be reserved and reused only one at a time. Each
process needs a maximum of 2 units. Show that a Deadlock cannot occur. b) N processes share
M resource units that can be reserved and released only one at a time. The maximum need of
each process does not exceed M and the sum of all maximum needs is less than M + N. Show
that a dead lock cannot occur.
7. How the deadlocks can be avoided? Explain with the help of necessary algorithms.
8. a) Consider the following snapshot of a system of 5 processes and 4 resources. Process Allocation
Max. Available P0 0012 0012 1520 P1 1000 1750 P2 1354 2356 P3 0632 0652 P4 0014
0656
i. What is the content of the vector need? ii. Is the system in a safe state? Verify with
algorithm. iii. If a request from process P1 arrives for (0 4 2 0) resources, can the request is
immediately granted? Why? With the help of necessary algorithms explain all the steps. b)
What are the diffculties that amy arise when a proces is rolled back as the result of a
deadlock.
UNIT-IV
SUBJECTIVE QUESTIONS
1a) Give a detailed description of acyclic graph directories. What are the problems with such a structure?
b) What are the implications of supporting UNIX consistency semantics for shared access for those files
that are stored on remote file systems?
2. a) Some systems automatically open a file when it is referenced for the first time and close the file
when the job terminates. Discuss the advantages and disadvantages of this scheme compared
with the more traditional one. where the user has to open and close the file explicitly.
b) Give a note on virtual file systems.
3. Discuss in detail various schemes for defining the logical structure of a directory.
4. Explain in detail various disk allocation methods.
5. a) Discuss about various criteria used for short-term scheduling.
b) Discuss about fair share scheduling method.
6. a) Discuss about various criteria used for short-term scheduling.
b) Discuss about fair share scheduling method.
7. a) Discuss about various criteria used for short-term scheduling.
b) Discuss about fair share scheduling method.
UNIT –V
1. JNTUH/Model papers
OPERATING SYSTEMS
(Common to CSE, IT)
(25 Marks)
1.a) Explain the functions of operating system. [2]
b) Explain about the abstract view of the components of a computer system. [3]
c) Distinguish between I/O bound process and CPU bound process. [2]
d) What are the requirements of Critical section problem? [3]
e) What is Demand Paging? [2]
f) Distinguish between logical and physical address space. [3]
g) Explain about the Acyclic graph directory. [2]
h) Explain about the Solid state disk. [3]
i) What is Access Control? [2]
j) Explain how to eliminate the deadlocks using resource preemption. [3]
PART-B
(50 Marks)
2. Explain how operating systems are used in a variety of computing environments. [10]
OR
3.a) What is operating system? Explain multiprogramming and time sharing systems.
b) Explain about the dual mode operation in OS with a neat block diagram. [5+5]
4.a) Explain about the Process Control Block.
b) What is Semaphore? How can we achieve the synchronization using semaphore for
producer consumer problem? [5+5]
OR
5.a) Discuss the Peterson’s solution for the race condition with algorithm.
b) What is the average waiting time and average turn around times of all processes for
FCFS, SJF algorithm? [5+5]
Precesses Burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
OR
7.a) Consider the following reference
string
7,0,1,2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1.
Assume there are three frames. Apply LRU replacement algorithm to the reference sting
above and find out how many page faults are produced. Illustrate the LRU page
replacement algorithm in detail and also two feasible implementation of the LRU
algorithm.
b) Explain about Swapping. [5+5]
8.a) Suppose that a disk drive has 5000 cylinders numbered 0 to 4999. The drive is currently
serving a request at cylinder 143. The queue of pending requests in FIFO order
86,1470,913,1774,948,1509, 1022, 1750, 130 starting from current head position. What is
the total distance that disk arm moves to satisfy all the pending request for FCFS and
SSTF disk scheduling algorithm.
b) Explain about the system call for File operations. [5+5]
OR
OR
11.a) Explain the protection mechanism illustrating the use of protection domain and access
control list.
b) What is deadlock? Explain the conditions that lead to deadlock. [5+5]
Previous Questions Papers
The user interface of the OS is a command interpreter, called a shell that runs as a user process. The
Unix kernel cannot be interrupted at any arbitrary moment of time; it can be interrupted only when a
process executing kernel code exits, or when its execution reaches a point at which it can be safely
interrupted. This feature ensures that the kernel data structures are not in an inconsistent state when an
interrupt occurs and another process starts executing the kernel code, which considerably simplifies
coding of the kernel. The Unix kernel has a long history of over four decades. The original kernel was
small and simple. It provided a small set of abstractions, simple but powerful features like the pipe
mechanism, which enabled users to execute several programs concurrently, and a small file system that
supported only one file organization called the byte stream organization. All devices were represented
as files, which unified the management of I/O devices and files.
Figure: Kernel of the Unix operating system.
The kernel was written in the C language and had a size of less than 100 KB. Hence it was easily
portable. However, the UNIX kernel was monolithic and not very extensible. So it had to be modified
as new computing environments, like the client–server environment, evolved. Interprocess
communication and threads were added to support client–server computing. Networking support
similarly required kernel modification.
A major strength of Unix was its use of open standards. It enabled a large number of organizations
ranging from the academia to the industry to participate in its development, which led to widespread
use of Unix, but also led to the development of a large number of variants because of concurrent and
uncoordinated development. The kernel became bulky, growing to a few million bytes in size, which
affected its portability. Around this time, a feature was added to dynamically load kernel modules in
memory. It enabled kernel modules to be loaded only when needed. This feature reduced the memory
requirement of the kernel, but not its code size. Hence it did not enhance its portability.
Several efforts have been made to redesign the UNIX kernel to make it modular and extensible. The
Mach kernel, which has a specific emphasis on multiprocessor systems, is an example of this trend.
Later Mach developed into a microkernel based operating system.
case study 2: Scheduling in UNIX
UNIX is a pure time-sharing operating system. It uses a multilevel adaptive scheduling policy in
which process priorities are varied to ensure good system performance and also to provide good user
service. Processes are allocated numerical priorities, where a larger numerical value implies a lower
effective priority.
In Unix 4.3 BSD, the priorities are in the range 0 to 127. Processes in the user mode have priorities
between 50 and 127, while those in the kernel mode have priorities between 0 and 49. When a process
is blocked in a system call, its priority is changed to a value in the range 0–49, depending on the cause
of blocking.
When it becomes active again, it executes the remainder of the system call with this priority. This
arrangement ensures that the process would be scheduled as soon as possible, complete the task it was
performing in the kernel mode and release kernel resources. When it exits the kernel mode, its priority
reverts to its previous value, which was in the range 50–127.
Process priority = base priority for user processes+ f (CPU time used recently) + nice value (7.5)
It is implemented as follows: The scheduler maintains the CPU time used by a process in its process
table entry. This field is initialized to 0. The real-time clock raises an interrupt 60 times a second, and
the clock handler increments the count in the CPU usage field of the running process. The scheduler
recomputes process priorities every second in a loop. For each process, it divides the value in the CPU
usage field by 2, stores it back, and also uses it as the value of f. Recall that a large numerical value
implies a lower effective priority, so the second factor in Eq. (7.5) lowers the priority of a process. The
division by 2 ensures that the effect of CPU time used by a process decays; i.e., it wears off over a
period of time, to avoid the problem of starvation faced in the least completed next (LCN) policy.
A process can vary its own priority through the last factor in Eq. (7.5). The system call “nice(<priority
value>);” sets the nice value of a user process. It takes a zero or positive value as its argument. Thus, a
process can only decrease its effective priority to be nice to other processes. It would typically do this
when it enters a CPU-bound phase.
E.Q. 7.5 Operation of a Unix-like Scheduling Policy When Processes Perform I/O
TIME Scheduled
P1 P2 P3 P4 P5
P T P T P T P T P T Process
0.0 60 0 P1
1.0 60 P1
90 30
2.0 90 0 P2
105 45 60 0
3.0 45 60 0 P3
82 22 90 30 60 0
3.1 82 22 90 30 60 6 P1
4.0 76 30 6 P3
98 38 75 15 63 3
4.1 98 38 75 15 63 9 P2
5.0 38 69 9 0 P4
79 19 94 34 64 4 60 0
6.0 19 34 4 60 P3
69 9 77 17 62 2 90 30
(12)-Assignment Question
Mid 1
1. What is System call? Discuss major System Calls of OS ? (CO1)
2. Explain in detail about Priority Scheduling Algorithm with Example. (CO2)
3. Explain Banker’s Algorithm in Detail. (CO2)
4.Describe about Co-Operating Process in detail. (CO1)
5.Define Process Synchronization. Explain in detail about Process Synchronization.(CO3)
Mid II
1.Differentiation between Paging and segmentation. (CO3)
2.Explain Contiguous Memory Allocation. (CO4)
3.Consider the following page reference strings:1,2,3,4,2,1,5,6,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 Algorithm assuming 3,4
frames? Remember that all frames are initially empty ,so your first unique pages will cost one
fault each 1)LRU Replacement 2)Optimal Replacement. (CO4)
4.Explain in detail about File System Structure and Implementation? (CO5)
5.Discuss about Free Space Management. (CO5)
Innovative Assignment Questions:
1. Describe about Network operating system?
3. What are the different types of CPU registers in a typical operating system. ?
4. Write few difference between Dynamic loading and Static loading of memory management?
Dead locks
Distributed Systems, Real-Time Systems
Scheduling algorithms
Semaphores
Page replacement algorithms
Segmentation with Paging