Semester - IV
Course code:22BCE4C2
Core Course-VI OPERATING SYSTEM
Unit -I
Introduction: Operating Systems - Computer-System Organization - Computer-System Architecture -
Operating-System Structure - Operating-System Operations – Process Management - Memory
Management - Storage Management - Protection and Security - Operating-System Structures :
Operating-System Services : User and Operating- System Interface - System Calls - Types of System
Calls - System Programs
Unit-II
Processes: Process Concept - Process Scheduling - Operations on Processes -
Interprocess Communication - Process Synchronization : Background - The Critical- Section Problem
- Peterson’s Solution - Synchronization Hardware - Mutex Locks - Semaphores - Classic Problems of
Synchronization – Monitors.
Unit -III
CPU Scheduling : Basic Concepts - Scheduling Criteria - Scheduling Algorithms - Thread Scheduling -
Multiple-Processor Scheduling - Real-Time CPU Scheduling - Deadlocks: System Model - Deadlock
Characterization - Methods for Handling Deadlocks - Deadlock Prevention - Deadlock Avoidance -
Deadlock Detection - Recovery from Deadlock
Unit -IV
Main Memory : Background - Swapping - Contiguous Memory Allocation -
Segmentation - Paging - Structure of the Page Table - Virtual Memory: Background - Demand Paging
- Copy-on-Write - Page Replacement - Allocation of Frames - Thrashing - Memory-Mapped Files -
Allocating Kernel Memory
Unit -V
Mass-Storage Structure: Overview of Mass-Storage - Structure - Disk Structure - Disk Attachment -
Disk Scheduling - Disk Management - Swap-Space Management - RAID Structure - Stable-Storage
Implementation - File-System Implementation: File- System Structure - File-System Implementation
- Directory Implementation – Allocation Methods - Free-Space Management - Efficiency and
Performance – Recovery
Text Book:
"Operating System Concepts", Abraham Silberschatz, Peter Baer Galvin,Greg Gagne, Ninth Edition,
John Wiley & Sons, Inc
,What is an Operating System?
A program that acts as an intermediary between a user of a computer and the computer
hardware
Operating system goals:
• Execute user programs and make solving user problems easier
• Make the computer system convenient to use
• Use the computer hardware in an efficient manner
Computer System Structure
Computer system can be divided into four components
• Hardware – provides basic computing resources
CPU, memory, I/O devices
• Operating system
Controls and coordinates use of hardware among various applications and users
• Application programs – define the ways in which the system resources are used to
solve the computing problems of the users
Word processors, compilers, web browsers, database systems, video games
• Users
People, machines, other computers
Four Components of a Computer System
,Operating System Definition
• An operating system as a resource allocator. A computer system has many resources
that may be required to solve a problem: CPU time, memory space, file-storage space,
I/O devices, and so on. The operating system acts as the manager of these resources.
• Decides between conflicting requests for efficient and fair resource use
• OS is a control program A control program manages the execution of user programs
to prevent errors and improper use of the computer. It is especially concerned with the
operation and control of I/O devices.
• “OS is the one program running at all times on the computer” is the kernel. Everything
else is either a system program (ships with the operating system) or an application
program
• System programs which are associated with the operating system but are not part of
the kernel, and application programs which include all programs not associated with
the operation of the system.)
Computer Startup
• bootstrap program is loaded at power-up or reboot
• Typically stored in ROM or EPROM, generally known as firmware
• Initializes all aspects of system
• Loads operating system kernel and starts execution
• Once the kernel is loaded and executing, it can start providing services to the system and
its users. Some services are provided outside of the kernel, by system programs that are
loaded into memory at boot time to become system processes, or system daemons that
run the entire time the kernel is running. On UNIX, the first system process is “init,” and
it starts many other daemons. Once this phase is complete, the system is fully booted,
and the system waits for some event to occur.
Computer System Organization
• Computer-system operation
• One or more CPUs, device controllers connect through common bus providing access
to shared memory
• Concurrent execution of CPUs and devices competing for memory cycles
, Computer-System Operation
• I/O devices and the CPU can execute concurrently
• Each device controller has a local buffer
• CPU moves data from/to main memory to/from local buffers
• Device controller informs CPU that it has finished its operation by causing An interrupt
• The occurrence of an event is usually signaled by an Interrupt from either the hardware
or the software. Hardware may trigger an interrupt at any time by sending a signal to
the CPU, usually by way of the system bus. Software may trigger an interrupt executing
a special operation called a System call (also called a monitor call)
Common Functions of Interrupts
• Interrupt transfers control to the interrupt service routine generally, through the
interruptvector, which contains the addresses of all the service routines
• Interrupt architecture must save the address of the interrupted instruction
• Incoming interrupts are disabled while another interrupt is being processed to prevent
a lost interrupt. A trap is a software-generated interrupt caused either by an error or a
user request
• An operating system is interrupt driven
Interrupt Handling
• The operating system preserves the state of the CPU by storing registers and the
program counter
• Determines which type of interrupt has occurred:
• Separate segments of code determine what action should be taken for each type of
interrupt
Course code:22BCE4C2
Core Course-VI OPERATING SYSTEM
Unit -I
Introduction: Operating Systems - Computer-System Organization - Computer-System Architecture -
Operating-System Structure - Operating-System Operations – Process Management - Memory
Management - Storage Management - Protection and Security - Operating-System Structures :
Operating-System Services : User and Operating- System Interface - System Calls - Types of System
Calls - System Programs
Unit-II
Processes: Process Concept - Process Scheduling - Operations on Processes -
Interprocess Communication - Process Synchronization : Background - The Critical- Section Problem
- Peterson’s Solution - Synchronization Hardware - Mutex Locks - Semaphores - Classic Problems of
Synchronization – Monitors.
Unit -III
CPU Scheduling : Basic Concepts - Scheduling Criteria - Scheduling Algorithms - Thread Scheduling -
Multiple-Processor Scheduling - Real-Time CPU Scheduling - Deadlocks: System Model - Deadlock
Characterization - Methods for Handling Deadlocks - Deadlock Prevention - Deadlock Avoidance -
Deadlock Detection - Recovery from Deadlock
Unit -IV
Main Memory : Background - Swapping - Contiguous Memory Allocation -
Segmentation - Paging - Structure of the Page Table - Virtual Memory: Background - Demand Paging
- Copy-on-Write - Page Replacement - Allocation of Frames - Thrashing - Memory-Mapped Files -
Allocating Kernel Memory
Unit -V
Mass-Storage Structure: Overview of Mass-Storage - Structure - Disk Structure - Disk Attachment -
Disk Scheduling - Disk Management - Swap-Space Management - RAID Structure - Stable-Storage
Implementation - File-System Implementation: File- System Structure - File-System Implementation
- Directory Implementation – Allocation Methods - Free-Space Management - Efficiency and
Performance – Recovery
Text Book:
"Operating System Concepts", Abraham Silberschatz, Peter Baer Galvin,Greg Gagne, Ninth Edition,
John Wiley & Sons, Inc
,What is an Operating System?
A program that acts as an intermediary between a user of a computer and the computer
hardware
Operating system goals:
• Execute user programs and make solving user problems easier
• Make the computer system convenient to use
• Use the computer hardware in an efficient manner
Computer System Structure
Computer system can be divided into four components
• Hardware – provides basic computing resources
CPU, memory, I/O devices
• Operating system
Controls and coordinates use of hardware among various applications and users
• Application programs – define the ways in which the system resources are used to
solve the computing problems of the users
Word processors, compilers, web browsers, database systems, video games
• Users
People, machines, other computers
Four Components of a Computer System
,Operating System Definition
• An operating system as a resource allocator. A computer system has many resources
that may be required to solve a problem: CPU time, memory space, file-storage space,
I/O devices, and so on. The operating system acts as the manager of these resources.
• Decides between conflicting requests for efficient and fair resource use
• OS is a control program A control program manages the execution of user programs
to prevent errors and improper use of the computer. It is especially concerned with the
operation and control of I/O devices.
• “OS is the one program running at all times on the computer” is the kernel. Everything
else is either a system program (ships with the operating system) or an application
program
• System programs which are associated with the operating system but are not part of
the kernel, and application programs which include all programs not associated with
the operation of the system.)
Computer Startup
• bootstrap program is loaded at power-up or reboot
• Typically stored in ROM or EPROM, generally known as firmware
• Initializes all aspects of system
• Loads operating system kernel and starts execution
• Once the kernel is loaded and executing, it can start providing services to the system and
its users. Some services are provided outside of the kernel, by system programs that are
loaded into memory at boot time to become system processes, or system daemons that
run the entire time the kernel is running. On UNIX, the first system process is “init,” and
it starts many other daemons. Once this phase is complete, the system is fully booted,
and the system waits for some event to occur.
Computer System Organization
• Computer-system operation
• One or more CPUs, device controllers connect through common bus providing access
to shared memory
• Concurrent execution of CPUs and devices competing for memory cycles
, Computer-System Operation
• I/O devices and the CPU can execute concurrently
• Each device controller has a local buffer
• CPU moves data from/to main memory to/from local buffers
• Device controller informs CPU that it has finished its operation by causing An interrupt
• The occurrence of an event is usually signaled by an Interrupt from either the hardware
or the software. Hardware may trigger an interrupt at any time by sending a signal to
the CPU, usually by way of the system bus. Software may trigger an interrupt executing
a special operation called a System call (also called a monitor call)
Common Functions of Interrupts
• Interrupt transfers control to the interrupt service routine generally, through the
interruptvector, which contains the addresses of all the service routines
• Interrupt architecture must save the address of the interrupted instruction
• Incoming interrupts are disabled while another interrupt is being processed to prevent
a lost interrupt. A trap is a software-generated interrupt caused either by an error or a
user request
• An operating system is interrupt driven
Interrupt Handling
• The operating system preserves the state of the CPU by storing registers and the
program counter
• Determines which type of interrupt has occurred:
• Separate segments of code determine what action should be taken for each type of
interrupt