Basics of Operating Systems

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

UNIVERSITY INSTITUTE OF COMPUTING

MASTER OF COMPUTER APPLICATIONS

OPERATING SYSTEMS
22CAT-154

DISCOVER . LEARN . EMPOWER


1
Syllabus
Unit-1
• Generations of operating systems - Definition, Generations of operating systems,
Types of Operating Systems: Mainframe, Desktop, Multiprocessor, Distributed,
Clustered, Multiprogramming, Real time, Embedded and Time sharing.
• Multiprogramming - Multitasking, Multiprogramming, Timesharing, Buffering,
Spooling
• Components - Process Management Component, Memory Management
component, I/O Management component , File Management component,
Protection System, Networking management component, Command interpreter.
• Processes - Processes: Definition, Process States, Process structure - PCB and
components, Operations on Processes, Threads.

2
Contents
• Introduction to Operating Systems
• Generations of Operating systems
• Types of Operating Systems
• Multiprogramming
• Components
• Processes

3
Introduction to Operating Systems

A program that acts as an intermediary between a user of a computer and the

computer hardware.

An operating system is a powerful, and usually large, program that controls and
manages the hardware and other software on a computer.

All computers and computer-like devices have operating systems, including your
laptop, tablet, desktop, smart phone, smart watch

Examples include: Microsoft Windows (like Windows 10,Windows 8, Windows


7, Windows Vista, and Windows XP), Apple's macOS,  iOS, Linux
4
Need of Operating Systems

• If the user wants to access any of the hardware they have to write a program and
whenever they want to access any hardware they have to write the program every
time. So it would be very complex

• For E.g.: Print a word file , we need to write the instruction for printing of the
file.

5
Introduction to Operating Systems
• What is an Operating system?
• OS is a resource allocator
• Manages all resources
• Decides between conflicting requests for efficient and fair resource use
• OS is a control program
• Controls execution of programs to prevent errors and improper use of the
computer
• 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
• An operating system is the one program that is running at all the times on the
computer- usually called the kernel. 6
Introduction to Operating Systems

• 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

7
Introduction to Operating Systems

8
Generations of Operating Systems

• Must adapt to hardware upgrades and new types of hardware. Examples:


• Character vs. graphic terminals
• Introduction of paging hardware
• Must offer new services, e.g., internet support.
• The need to change the OS on regular basis place requirements on it’s
design:
• Modular construction with clean interfaces.
• Object oriented methodology.

9
Generations of Operating Systems
The First Generation (1940's to early 1950's)
 No Operating System
 All programming was done in absolute machine language, often by wiring up plug-boards to
control the machine’s basic functions.
The Second Generation (1955-1965)
 First operating system was introduced in the early 1950's.It was called GMOS
 Created by General Motors for IBM's machine the 701.
 Single-stream batch processing systems
The Third Generation (1965-1980)
 Introduction of multiprogramming
 Development of Minicomputer
The Fourth Generation (1980-Present Day)
 Development of PCs
 Birth of Windows/MaC OS

10
Generations of Operating Systems
• Early Operating Systems (1950):
• Structure
• Single user system.
• Programmer/User as operator (Open Shop).
• Large machines run from console.
• Paper Tape or Punched cards.

11
Generations of Operating Systems

Characteristics of Early Operating Systems :

• Assemblers, Libraries of common subroutines (I/O, Floating-point), Device


Drivers, Compilers, Linkers.

• Need significant amount of setup time.

• Extremely slow I/O devices.

• Very low CPU utilization.

• But computer was very secure.

12
Generations of Operating Systems

Simple Batch Systems (1960) :

• Use of high-level languages, magnetic tapes.

• Jobs are batched together by type of languages.

• An operator was hired to perform the repetitive tasks of loading jobs, starting the
computer, and collecting the output (Operator-driven Shop).

• It was not feasible for users to inspect memory or patch programs directly.

13
Generations of Operating Systems

14
Generations of Operating Systems

• Operations of Simple Batch Systems :

• The user submits a job (written on cards or tape) to a computer operator.

• The computer operator place a batch of several jobs on an input device.

• A special program, the monitor, manages the execution of each program in the
batch.

• Monitor utilities are loaded when needed.

• “Resident monitor” is always in main memory and available for execution.

15
Generations of Operating Systems

Idea of Simple Batch Systems :

• Reduce setup time by batching similar jobs.

• Alternate execution between user program and the monitor program.

• Rely on available hardware to effectively alternate execution from various parts


of memory.

• Use Automatic Job Sequencing – automatically transfer control from one job
when it finishes to another one.

16
Types of Operating Systems

• Batch Operating System


• Multiprogramming Operating System
• Time-Sharing Operating Systems
• Multiprocessing Operating Systems
• Distributed Operating Systems
• Network Operating Systems
• Real Time Operating Systems
• Embedded Operating Systems

17
Types of Operating Systems
Batch Operating Systems:
• The users of this type of operating system does not interact with the computer directly.
• Each user prepares his job on an off-line device like punch cards and submits it to the computer
operator
• There is an operator which takes similar jobs having the same requirement and group them into
batches.

18
Types of Operating Systems
Advantages of Batch Operating System: 
 Processors of the batch systems know how long the job would be when it is in
queue
 Multiple users can share the batch systems
 The idle time for the batch system is very less
 It is easy to manage large work repeatedly in batch systems
Disadvantages of Batch Operating System:  
 The computer operators should be well known with batch systems
 Batch systems are hard to debug
 It is sometimes costly
 The other jobs will have to wait for an unknown time if any job fails
Examples of Batch based Operating System:
IBM's MVS
19
Types of Operating Systems

Multiprogramming Operating Systems:


• This type of OS is used to execute more than one jobs simultaneously by a single processor.
• It increases CPU utilization by organizing jobs so that the CPU always has one job to execute.
• Multiprogramming operating systems use the mechanism of job scheduling and CPU scheduling.

20
Types of Operating Systems
Time Sharing Operating Systems:
• Each task is given some time to execute so that all the tasks work smoothly.
• These systems are also known as Multi-tasking Systems.
• The task can be from a single user or different users also.
• The time that each task gets to execute is called quantum.
• After this time interval is over OS switches over to the next task. 

21
Types of Operating Systems
• Advantages of Time-Sharing OS:  
Each task gets an equal opportunity
Fewer chances of duplication of software
CPU idle time can be reduced
• Disadvantages of Time-Sharing OS:  
Reliability problem
One must have to take care of the security and integrity of user programs and
data
Data communication problem
• Examples of Time-Sharing Oss
Multics, Unix, etc. 

22
Types of Operating Systems
• Multiprocessor Operating Systems are also known as parallel OS or tightly
coupled OS.
• Such operating systems have more than one processor in close communication
that sharing the computer bus, the clock and sometimes memory and peripheral
devices.
• It executes multiple jobs at the same time and makes the processing faster.
• It supports large physical address space and larger virtual address space.
• If one processor fails then other processor should retrieve the interrupted process
state so execution of process can continue.
• Inter-processes communication mechanism is provided and implemented in
hardware.

23
Types of Operating Systems
Distributed Operating Systems :
• Various autonomous interconnected computers communicate with each other using a shared
communication network.
• Independent systems possess their own memory unit and CPU.
• These are referred to as loosely coupled systems.
• Examples:- Locus, DYSEAC

24
Multiprogramming & Multitasking

• In multiprogramming system, when one program is waiting for I/O transfer; there
is another program ready to utilize the CPU. So it is possible for several jobs to
share the time of the CPU. But it is important to note that multiprogramming is not
defined to be the execution of jobs at the same instance of time.
• CPU should not be idle
• Non-Preemptive
• CPU should not be free.
• In this the process1(P1) will be executed fully by CPU only then the CPU
will acquired by the process(P2),or if the p1 wants to leave otherwise CPU
is not going to release the P1.

25
Multiprogramming & Multitasking

Advantages of Multiprogramming :

• It improves the CPU efficiency by increasing the CPU utilization.

• Increase throughput- Throughput means total number of programs executed over a


fixed period of time.

26
Multiprogramming & Multitasking
Multiprocessing:

• Multiple Processing means multiple processor.

• In a single system ,we have multiple processor like

• Octa core->8 Processor

• Dual Core->2 Processor

• In multiprocessing OS ,more than one process can run on different CPU at the
same time, So there is real parallel execution of Process.

27
Multiprogramming & Multitasking
Advantages of Multiprocessing:

• Increased Throughput − By increasing the number of processors, more work can


be completed in a unit time.

• Cost Saving − Parallel system shares the memory, buses, peripherals etc.

• Multiprocessor system thus saves money as compared to multiple single systems.

28
Multiprogramming & Multitasking
• Multitasking has the same meaning of multiprogramming but in a more general
sense, as it refers to having multiple (programs, processes, tasks, threads) running
at the same time. This term is used in modern operating systems
when multiple tasks share a common processing resource (e.g., CPU and Memory)
• Multitasking is an extension to Multiprogramming OS.
• The Jobs will be executed in the time sharing mode.
• Multitasking/Timesharing Operating Systems
• Preemptive
• (Responsiveness)
• Some Specific time limit must be given to the Process 01(P1) if it runs on
that particular time, its well & good otherwise that process will be run in
future and the CPU will be acquired by the Process 02 (P2).

29
Multiprogramming & Multitasking
• Multitasking has the same meaning of multiprogramming but in a more general
sense, as it refers to having multiple (programs, processes, tasks, threads) running
at the same time. This term is used in modern operating systems
when multiple tasks share a common processing resource (e.g., CPU and Memory)
• Multitasking is an extension to Multiprogramming OS.
• The Jobs will be executed in the time sharing mode.
• Multitasking/Timesharing Operating Systems
• Preemptive
• (Responsiveness)
• Some Specific time limit must be given to the Process 01(P1) if it runs on
that particular time, its well & good otherwise that process will be run in
future and the CPU will be acquired by the Process 02 (P2).

30
THANK YOU

31

You might also like