0% found this document useful (0 votes)
76 views39 pages

Operating System: By: Swati Singh Assistant Professor Uttaranchal University

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

Operating System: By: Swati Singh Assistant Professor Uttaranchal University

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

Operating System

By: Swati Singh


Assistant Professor
Uttaranchal University
What is Operating System?
• It is a software
• Through this, computer hardware works.
What is the definition of OS?
• It helps user to communicate with the computer.
• It acts as an interface between computer hardware and the
users.
• It manages the use of computer resources, and makes the
tasks easier for users.
• It is the master controller of computer system.
History of OS

• FORTRAN OS, General Motors OS, I/O system are the Operating systems
that were developed in 1950s, but they handled only a single task at a
time.

• Admiral, Basic Executive System, Input Output Control System,


SABRE(Semi Automatic Business Related Environment) were developed
in 1960s, allowed multitasking.

• UNIX OS was introduced in 1970s, with multi user environment. File


management, process management, memory management.
History of OS
• Year 1990 came up with the big revolution by introducing GUI based
OS and fast processing devices.

• Windows 2000, Windows Server 2003, Windows XP were introduced


with advanced internet and security facilities.
What are the Major Tasks of OS?
• Operate
• Control
• Handle
• Manage
OPERATE

CONTROL
HANDLE

MANAGE
What is Kernel in OS?
• It is a core component of an Operating System that manages
operations of computer and hardware.
• It loads first into the memory when OS runs.
• Acts as a bridge between data processing at hardware level using
inter-process communication and system calls.
• Decide the state of incoming processes.
• Control the tasks.
Difference between OS and Kernel
Sr. No. Operating System Kernel

1 It is the first program when computer system Its is the first program to load when an operating
boots up system runs
2 It is a system software It is a part of Operating System

3 It is a system software It is a part of operating system

4 It acts as an interface between user and It acts as an interface between applications and
hardware hardware
5 Provides ease to use system operations, security Memory management, task management
etc. handled by kernel
Functions of Operating System

Functions

Process Memory File Device Security


Management Management Management Management Management
Process Management
• Process state
• Process Control Block
• Process Operations
• Process Scheduling
• Process Synchronization
• Inter-process communication
• Management of deadlocks
Process States
New

Ready

Waiting

Executing

Blocked Suspended

Terminated
Process Control Block
Uniquely identifies the
Process ID process

State of the process like


Process State ready, wait etc.

Points to the next instruction to


Program Counter be executed in a program

Information of various registers associated


Register Information with the process MAR, ACC etc.

Scheduling Information Priority information pertaining to a process

Memory Related It comprises page and segment tables. Stores


Information the data contained in base and limit registers

Stores the details related to CPU utilization


Accounting Information and execution time of a process

Stores the details of resource utilization and


Status Information execution time of the process
Process Operations

Process Operations

Process Creation Process Termination

Corresponding to every task there is a The last step after the safe execution
process associated with it. of the process. Resources gets
Log in to Computer System, Open an released after the termination of a
application such as MS Word or process.
Printing of a document
Process Scheduling
• Through this OS decides the priority processes which are ready and
waiting states
• It ensures the maximum utilization of CPU.
• OS uses Scheduler for deciding the priority of process.
Scheduling Algorithms
• First Come First Serve (FCFS) Scheduling
• Shortest Job First (SJF) Scheduling
• Priority Scheduling
• Round Robin Scheduling
Deadlock
• It is a condition that occurs when multiple processes wait for each
other to free up resources and as a result all processes remain halted.
Memory Management
• Allocating the main memory space to a process
• Enable the execution of multiple processes at the same time
• Utilization of small free spaces
• It ensures accuracy, availability and consistency of data
Memory Management

Segmentation Paging Swapping


It is a technique to divide the It is a technique through which It is used for efficient memory
physical memory space into OS obtain the physical memory management for working on
different blocks having specific location without specifying large files. Swap In and Swap
length known as segment. Each lengthy address of data. It Out functions are performed.
segment has a starting address works as an index.
called base address
File Management
• Creating new files
• Easily locating the files
• Sharing files among different users
• Storing the files in separate folders/ directories
• Modify the content as well as name of the file
File Management

File Access
File Attributes File Operations File System
Permissions

• Name • Create • Read • File Allocation


• File Type • Save • Write Table(FAT)
• Location • Open • Access • New Technology File
• Size • Modify System(NTFS)
• Date and Time • Close
• Read-only • Rename
• Hidden • Delete
Device Management
• Manage all the hardware devices
• Keeps a track of status of all the devices
• Allocate the free device to another process
• Use device controller and device drivers
• OS communicates with device controller with the help of device
drivers.
Security Management
Security Helps in implementing the
mechanism to secure and
Management protect the computer system

Internal External
Protection of activities Secure the data and
from one process to programs from
another process unauthorized access
Types of Operating System
Multi
Batch Processing
Programming

Real Time OS types Network

Time Sharing Distributed


Batch Processing Operating System
• Similar types of jobs are batched together
• Jobs are batched together as per the similar needs
• Job execution is done through FCFS

Central Processing Unit


Job 1 Batch 1
Operating
System

Job 2 Batch 2

Job 3 Batch 3
ADVANTAGES:
• Time constraint is not there
• Multiple users can share
• Easy to do large number of jobs at the same time

DISADVANTAGES:
• These are hard to debug
• Other jobs has to wait for an unknown time period
• If any job failed, then other jobs may suffer halt condition
Time Sharing Operating System
• Each task is given a time for execution
• The time given to each task for execution is called quantum.

Application 1

Central Processing Unit


(MS Word)

Operating System
Application 2
(Chrome)

Application 3
(Software
Download)
ADVANTAGES:
• Each task gets and equal priority to execute
• CPU Idle time reduce

DISADVANTAGES:
• Issue of security and integrity
• Data communication problem
Distributed Operating System
• Various autonomous computers connected with each other using a
shared communication network.
• These are also called loosely coupled systems.
• These systems are of different size and functions.
• One user access the files or software that actually not present on his
system but some other system connected with this system.
• Remote access is enabled.
ADVANTAGES:
• Failure of one will not affect the other network communication.
• Due to shared resources, computation is fast and durable.
• Load on host computer reduces.
• Delay in data processing reduces.
• Many systems can be added to the network.

DISADVANTAGES:
• These systems are not readily available, in turn costly.
• Failure of main network will stop the entire network.
Network Operating System
• It is a small private network.
• These network allow shared access of printers, files, security and
applications.
• All users are well aware of the underlying configuration, of all the
users within the network, their individual connections etc.
• These computers are tightly coupled systems.
ADVANTAGES:
• Highly stable centralized servers.
• New technologies and hardware up-gradation are easily integrated
into the system.
• Server access is possible remotely.

DISADVANTAGES:
• Servers are costly.
• Maintenance and updates are required regularly.
Real Time Operating System
• These systems are specially designed for handling real time
applications or embedded applications.

• Automobiles, Industrial machines, Medical equipment.


HARD REAL TIME SYSTEMS SOFT REAL TIME SYSTEMS

These operating system are meant These operating system are for
for applications where time applications where from time
constraints are very strict and even constraint is less strict. The delay
the shortest possible delay is not can be accepted. Example- online
acceptable. Example- Aircraft transaction system.
system.
ADVANTAGES:
• Maximum utilization of devices and system.
• These type of systems are error free.
• Focus more on running applications than the applications in queue.

DISADVANTAGES:
• Very few task run at the same time.
• The algorithms are very complex and difficult to design.
• Systems are less prone to switch the tasks.
System Call
• System call is a way of program to interact with operating system.
• It is a programmatic way in which a computer program requests a
service from the kernel of the operating system it is executed on.
• A system call created when a computer program makes a request to
the operating system’s kernel.
• System call provides the services of operating system to the kernel
through API(Application Program Interface).
• System calls are the only entry points into the kernel system.
System call Services
• Process creation and management.
• Main memory management
• File access.
• Device handling(I/O)
• Protection
• Networking
Examples of System calls in Windows and
UNIX
WINDOWS UNIX

Process Control CreateProcess() fork()


ExitProcess() exit()
File Manipulation CreateFile() open()
ReadFile() read()
Device Manipulation ReadConsoleMode() read()
WriteConcoleMode() write()
Information GetCurrentProcessID() getpid()
Maintenance Sleep() sleep()
Communication CreateFileMapping() shmget()
CreatePipe() pipe()
Protection SetFileSecurity() chmod()
SetSecurityDescriptionGroup() chown()

You might also like