Os 2
Os 2
Os 2
by:
Bijoy Das
Assistant Professor
1 / 31
What is an Operating System (OS) ?
A program that acts as an intermediary between a user of a computer
and the computer hardware
OS Usage
− Hardware abstraction
− Resource Management
”The one program running at all times on the computer” is the kernel
Operating Systems
− Controls and coordinates use of hardware among various applications
and users
Users
− People, machines, other computers
3 / 31
Four Components of a Computer System
... database
compiler assembler text editor
system
operating system
computer hardware
4 / 31
What Operating System Do
5 / 31
OS as Resource Manager
File System
OS as Resource Manager
Management
Allow multiple processes to share
resources
Networking Inter Process Improves performance by efficient
Stack Communication
utilization of resources.
8 / 31
Multi-Programming Operating System
Advantages
Multi Programming increases the Throughput of the System
It helps in reducing the response time 9 / 31
Multi-Processing Operating System
a type of Operating System in which more than one CPU is used for
the execution of resources.
It betters the throughput of the System
10 / 31
Time-sharing Operating System
Each task is given some time to execute so that all the tasks work
smoothly.
Each user gets the time of the CPU as they use a single system
Disadvantages of Time-sharing OS
High-overhead
complexity
Security Risks
12 / 31
Real-time Operating System
These types of OSs serve real-time systems.
Real-time systems are used when there are time requirements that are
very strict like missile systems, air traffic control systems, robots, etc.
When it has to wait (for I/O for example), OS switches to another job
14 / 31
contd ..
Timesharing (multitasking)
is logical extension in which CPU switches job so frequently that users can
interact with each job while it is running, creating interactive computing
Response Time should be < 1 second
16 / 31
Contd ..
Usage of OS
App Easy to program apps
− No more nitty-gritty
printf ("%s", str); details for
programmers
system call
Reusable
( write to STDOUT )
− apps can reuse OS
Operating System functionality
device driver Portable
− The app does not
change when
hardware changes
17 / 31
Computer System Organization
Computer-system operation
One or more CPUs, device controllers connect through a common bus
providing access to shared memory
Concurrent execution of CPUs and devices competing for memory
cycles.
18 / 31
Computer System Operation
19 / 31
Storage Definition and Notation Review
− bit: basic unit of computer storage. It can contain one of the two
values 0 and 1
− A byte is 8 bits
− word: Unit of data. It is made up of one or more bytes.
− A kilobyte, or KB, is 1024 bytes or 210 bytes
− A megabyte, or MB, is 10242 bytes or 220 bytes
− A gigabyte, or GB, is 10243 bytes or 230 bytes
− A terabyte, or TB, is 10244 bytes or 240 bytes
− A petabyte, or PB, is 10245 bytes or 250 bytes
Computer manufacturers often round off these numbers and say that a
megabyte is 1 million bytes and a gigabyte is 1 billion bytes
20 / 31
Storage Structure
Main Memory
Storage media that the CPU can access directly
− Random access
− Volatile
Hard Disk
Rigid metal or glass platters covered with magnetic recording material
− Disk surface is logically divided into tracks, which are subdivided into
sectors
− The disk controller determines the logical interaction between the
device and the computer
Solid-state disks
faster than hard disks, nonvolatile faster than hard disks, nonvolatile
− Various technologies
− Becoming more popular 21 / 31
Storage Hierarchy
22 / 31
Storage-Device Hierarchy
24 / 31
Major OS Components
Process Management
Memory Management
Protection Management
Network Management
25 / 31
Process Management
26 / 31
Process Management Activities
27 / 31
Memory Management
All (or part) of the data that are needed by the program must be in
memory
28 / 31
Storage Management
File-System Management
Files usually are organized into directories
Access Control mechanism (permission of the user)
OS activities
Creating and deleting files and directories
Primitives to manipulate files and directories
mapping files onto secondary storage
backup files onto stable storage medium
29 / 31
I/O Management
30 / 31
Protection and Security
31 / 31