0% found this document useful (0 votes)
21 views40 pages

FirstModule ClassContent 1

The document outlines a course syllabus for an Operating Systems class, detailing various units covering topics such as the basics of operating systems, process and thread management, CPU scheduling, memory management, file systems, and security. It includes an introduction to operating systems, their structures, and examples of different operating systems. Additionally, it discusses computer organization, I/O structures, and data transfer modes, emphasizing the role of operating systems in managing hardware and providing services to applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views40 pages

FirstModule ClassContent 1

The document outlines a course syllabus for an Operating Systems class, detailing various units covering topics such as the basics of operating systems, process and thread management, CPU scheduling, memory management, file systems, and security. It includes an introduction to operating systems, their structures, and examples of different operating systems. Additionally, it discusses computer organization, I/O structures, and data transfer modes, emphasizing the role of operating systems in managing hardware and providing services to applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

OPERATING SYSTEM

Dr. Abha Trivedi

[email protected]
COURSE SYLLABUS
Unit No. Unit Content
Basic of Operating System and Its Structures:
1 Introduction: Computer System Organization-Architecture-Structure-Operations. Management: Process-Memory-
Storage. Structures: Services-System Interface- System Calls- System Program-Design-structure

Process and Threads


2 Introduction to Process – Scheduling – Operations-Interprocess Communication. Synchronization: Critical
Section-Hardware-Mutex- Semaphore –Monitors. Threads: Multithreading Models-Thread Library- Issues

Processor Scheduling and Deadlocks


3 CPU Scheduling :Scheduling Criteria- Algorithms-Evaluation. Deadlocks: Principles- Prevention- Avoidance-
Detection-Recovery

Memory and Storage Management


4 Main Memory: Swapping-Contigious Memory Allocation – Segmentation – Paging. Virtual Memory: Demand
Paging- Page Replacement Algorithm. Secondary Storage: Disk Scheduling-Disk Management- RAID

File System, I/O and Security


5 File Systems: Concepts- Structure-Allocation Methods. I/O Systems: Hardware - Interface- Transformation.
Security and Protection: Access Matrix- Access Control-Program Threats-Cryptography- Defence Mechanism.

6 Guest Lecture on Contemporary Topics ( Virtualization and Cloud Environment)


TEXT BOOKS

LTP COURSE

Tutorials (Assignments/Class works)

Group Activities (Home-works / Presentations)

LAB Assessments (Implement works / Experiments)


UNIT - I

 Basic of Operating System and Its Structures

 What Operating Systems Do  Operating-System Structure


 Computer-System Organization  Operating System Services

 Computer-System Architecture  System Calls


 System Programs
 Operating-System Operations
 Process Management  System Structure
 Memory Management
 Storage Management
 File Management
INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?


• What are key components of an Operating system?
• Operating systems Examples
• Computer System Operation

Simple OS Definition:

A special piece of software that “Abstracts” and “Arbitrates” the use of a


computer system
INTRODUCTION TO OPERATING SYSTEM

• Visual Metaphor : “An operating system is like a …. Toy Shop Manager”


INTRODUCTION TO OPERATING SYSTEM

• Visual Metaphor : “An operating system is like a …. Toy Shop Manager”

• Directs operational resources


• Control use of employee time, parts, tools…

• Enforces working policies


• Fairness, safety, clean-up

• Mitigates difficulty of complex tasks


• Simplifies operation & optimizes performance
INTRODUCTION TO OPERATING SYSTEM

• Visual Metaphor :
“An Operating system is like a …. Toy Shop Manager”

• Directs operational resources • Directs operational resources


• Control use of CPU, Memory, • Control use of employee time, parts,
Peripheral devices…. tools…
• Enforces working policies • Enforces working policies
• Fair resource access, limits to • Fairness, safety, clean-up
resource usage..
• Mitigates difficulty of complex tasks
• Mitigates difficulty of complex tasks
• Simplifies operation & optimizes
• Abstract hardware details performance
(system calls)
INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?


INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?


INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?

Operating System
INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?

• Hide hardware Complexity


Operating System
INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?

Operating System
File (read/write)
• Hide hardware Complexity
Storage
INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?

Operating System
Socket (send/recv) File (read/write)
• Hide hardware Complexity
Networks Storage
INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?

Operating System
Socket (send/recv) File (read/write)
• Hide hardware Complexity
Networks Storage
• Resource Management
INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?

Operating System
Socket (send/recv) File (read/write)
• Hide hardware Complexity
CPU Scheduling Networks Storage Mem.
mngt • Resource Management
INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?

Operating System
Socket (send/recv) File (read/write)
• Hide hardware Complexity
CPU Scheduling Networks Storage Mem.
mngt • Resource Management

• Provide isolation and protection


INTRODUCTION TO OPERATING SYSTEM

• What is an Operating System?

Operating System
Socket (send/recv) File (read/write)
• Hide hardware Complexity
CPU Scheduling Networks Storage Mem.
mngt • Resource Management

• Provide isolation and protection


INTRODUCTION TO OPERATING SYSTEM

• Operating System Definition:

An operating system is a layer of systems software that:


– Directly has privileged access to the underlying hardware;
– Hides the hardware complexity;
– Manages hardware on behalf of one or more applications according to some
predefined policies
– In addition, it ensures that applications are isolated and protected from one
another
INTRODUCTION TO OPERATING SYSTEM

• Operating System Examples: Differ based on environment targeted for… (simple desktop,
embedded, workstation, server etc.

Embedded
Desktop
(shown bigger
proliferation with the
rise of smart devices)

• Microsoft Windows (1980) [MS-DOS to windows • Android (icecream, cupcake, kitkat, sandwich,
11 21H2] Red Velvet Cake 11, Android 12) (Embedded
• MAC OS version of LINUX); Also, Android OS for
• Unix (Late 1960) PC’s [Prime OS, Phoenix etc.]
• Linux [Linus Torvalds] (Ubuntu-20.4 LTS focal • IOS
fossa, CentOS) • Symbian
What does open source mean? | HowStuffWorks
INTRODUCTION TO OPERATING SYSTEM

• Computer System Operation:

Some basic knowledge of the structure of Computer System is required to


understand how Operating System work
INTRODUCTION TO OPERATING SYSTEM

Some Important terms


• Bootstrap Program:
– The initial program that runs when a computer is powered up or rebooted
– It is stored in the ROM
– It must know how to load the OS and start executing that system
– It must locate and load the OS Kernel in memory.
• Interrupt:
– An event that causes a temporary halt in the execution and alters the sequence of instructions
executed by the processor
– Interrupt is triggered either by the hardware or software
• If an interrupt is caused by a signal on an external pin, it is called hardware interrupt
• If an interrupt is caused by writing an instruction, it is called Software interrupt (division by zero)

• System Call: Software may trigger an interrupt by executing a special operation called
System Call.
INTRODUCTION TO OPERATING SYSTEM

When the CPU is interrupted, it stops what it is doing and immediately transfers execution to a
fixed location.
– The fixed location usually contains the starting address where the Service Routine of the
interrupt is located.

The Interrupt Service Routine executes.

On completion, the CPU resumes the interrupted computation.


INTRODUCTION TO OPERATING SYSTEM

• Computer Organization:
– Storage Structure and I/O Structure
• Computer System Architecture
• Operating system Structure
• Operating System Services
• User Operating System Interface
INTRODUCTION TO OPERATING SYSTEM

• Computer Organization: Storage Structure


INTRODUCTION TO OPERATING SYSTEM
INTRODUCTION TO OPERATING SYSTEM

Cache/Registers RAM Pen Drive ROM

4-6 transistors 1 transistor and


many capacitors
INTRODUCTION TO OPERATING SYSTEM

• Computer Organization: Storage Structure


• Important principle, performed at many levels in a computer
• Information in use copied from slower to faster storage temporarily
• Faster storage (cache) checked first to determine if information is there
– If it is, information used directly from the cache (fast)
– If not, data copied to cache and used then
• Cache smaller than storage being cached
– Cache management important design problem
– Cache size and replacement policy
INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure

• A large portion of operating system code is dedicated to manage I/O, both because of its importance to the
reliability and performance of a system, and because of the varying nature of the devices
• A modern general-purpose computer system consists of one or more CPUs and a number of device
controllers connected through a common bus
• Each device controller is in charge of a specific type of device

maintains

Local Buffer Storage Set of Special Purpose Registers

• Typically, operating systems have a device driver for each device controller

• This device driver understands the device controller and presents a uniform interface to the device
to the rest of the operating system
INTRODUCTION TO OPERATING SYSTEM

A modern general-purpose computer system consists of one or more CPUs and a number of
device controllers connected through a common bus that provides access to shared memory
INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure


INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure

I/O Characteristics: with different aspects


INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure

I/O data transfer modes

• Program I/O: status register, flag bit


• One byte at a time
• Device Controller

• Interrupt: event-driven
• asynchronous operation
• interrupt controller

• DMA: bulk transfer


• high-speed I/O
• DMA controller
INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure

I/O data transfer modes

• Program I/O: status register, flag bit


• One byte at a time
INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure

I/O data transfer modes:


Program I/O:
INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure


• To start an I/O operation, the device driver loads the appropriate
registers within the device controller
• The device controller, in turn, examines the contents of these
registers to determine what action to take
• The controller starts the transfer of data from the device to its
local buffer
• Once the transfer of data is complete, the device controller
informs the device driver via an interrupt that it has finished its
operation

• The device driver then returns control to the operating system

• This form of interrupt-driven I/O is fine for moving small


amounts of data but can produce high overhead when
used for bulk data movement such as disk IO

• To solve this problem, Direct Memory Access (DMA) is used


INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure


Direct Memory Access (DMA)

• Used for high-speed I/O devices able to transmit


information at close to memory speeds

• Only one interrupt is generated per block, rather than one


interrupt per byte

• While the device controller is performing these operations,


the CPU is available to accomplish other works

• After setting up buffers, pointers, and counters for the I/O device, the device
controller transfer an entire block of data directly to or from its own buffer
storage to memory, without any intervention by the CPU
INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure


Direct Memory Access Controller Unit
INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure


Direct Memory Access
INTRODUCTION TO OPERATING SYSTEM

Computer Organization: I/O Structure

You might also like