Module 2 PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Module No.

#2

OPERATING SYSTEMS

Presented By

DHIVIYA ROSE J
Assistant Professor – Senior Scale
CIT | CoES | UPES
What is OS?
• Operating System is a software, which makes a computer
to actually work.

• It is the software the enables all the programs we use.

• The OS organizes and controls the hardware.

• OS acts as an interface between the application programs


and the machine hardware.

• Examples: Windows, Linux, Unix and Mac OS, etc.,

Digital Devices and its Applications


Structure of Operating System:
Application Programs

System Programs

Software (Operating System)

HARDWARE

(Contd…)

Digital Devices and its Applications


Digital Devices and its Applications
• The structure of OS consists of 4 layers:
1. Hardware
Hardware consists of CPU, Main memory, I/O
Devices, etc,

2. Software (Operating System)


Software includes process management
routines, memory management routines, I/O
control routines, file management routines.

(Contd…)

Digital Devices and its Applications


3. System programs
This layer consists of compilers, Assemblers,
linker etc.

4. Application programs
This is dependent on users need. Ex. Railway
reservation system, Bank database
management etc.,

Digital Devices and its Applications


7A-7

Functions of Operating Systems


1. Provide a user interface
2. Run programs
3. Resource Management - Manage hardware
devices
4. Memory Management - Organized file storage
5. Process management – Manage the running
process and its data

Digital Devices and its Applications


1.Providing a User Interface
• User interface
▫ How a user interacts with a computer
▫ Require different skill sets
▫ Types
 Graphical User Interface
 Command Line Interface

Digital Devices and its Applications


• Graphical user interface (GUI)
▫ Most common interface
 Windows, OS X, Gnome, KDE
▫ Uses a mouse to control objects
▫ Uses a desktop metaphor
▫ Shortcuts open programs or documents
▫ Open documents have additional objects
▫ Task switching
▫ Dialog boxes allow directed input

Digital Devices and its Applications


• Command line interfaces
▫ Older interface
 DOS, Linux, UNIX
▫ User types commands at a prompt
▫ User must remember all commands
▫ Included in all GUIs

Digital Devices and its Applications


2. Running Programs
• Many different applications supported
• System call
▫ Provides consistent access to OS features
• Share information between programs
▫ Copy and paste
▫ Object Linking and Embedding

Digital Devices and its Applications


3. Resource Management
• Control the hardware devices
• Programs need to access hardware
• Interrupts
▫ CPU is stopped
▫ Hardware device is accessed
• Device drivers control the hardware

Digital Devices and its Applications


4. Memory Management
• Organizing Files and Folders
• Organized storage
• Long file names
• Folders can be created and nested
• All storage devices work consistently

Digital Devices and its Applications


4. Process Management
• Fundamental to the structure of operating
systems

A process can be defined as:

a program in execution
an instance of a running program

the entity that can be assigned to, and executed on, a processor

a unit of activity characterized by a single sequential thread of execution,


a current state, and an associated set of system resources

Digital Devices and its Applications


Process Management

▪ The entire state of the process


at any instant is contained in its
context
▪ New features can be designed
and incorporated into the OS by
expanding the context to include
any new information needed to
support the feature
Types of Operating System(Evolution)
1. Batch Processing
2. Multi Programming
3. Multi Tasking Time
Sharing

4. Multi Processing
Multi
Tasking Systems
Multi
Programmed

5. Time Sharing Applications


Simple
Batch
Systems
Serial
Processi
ng

Digital Devices and its Applications


1.Batch Processing
• In Batch processing same type of jobs batch (BATCH- a
set of jobs with similar needs) together and execute at a
time.
• The job was submitted to the computer operator in form
of punch cards. At some later time the output appeared.
• The OS was always resident in memory. (Ref. Fig. next
slide)
• Common Input devices were card readers and tape
drives.

Digital Devices and its Applications


• Common output devices were line printers, tape drives,
and card punches.
• Users did not interact directly with the computer
systems, but he prepared a job (comprising of the
program, the data, & some control information).
OS

User
program
area

Digital Devices and its Applications


• Single user/Single tasking OS
▫ One user works on the system
▫ Performs one task at a time
▫ MS-DOS and Palm OS
▫ Take up little space on disk
▫ Run on inexpensive computers

Digital Devices and its Applications


• Operating System cannot be able to take
control back from the running
process/task/application
• Bad utilization of CPU time - the processor
stays idle while I/O devices are in use

Digital Devices and its Applications


2. Multiprogramming
• Multiprogramming is a technique to execute number of
programs simultaneously by a single processor.
• In Multiprogramming, number of processes reside in
main memory at a time.
• The OS picks and begins to executes one of the jobs in
the main memory.
• If any I/O wait happened in the executing process, then
CPU switches from that job to another job.
• Hence CPU in not idle at any time.

Digital Devices and its Applications


Multiprogramming (Contd…):
OS • Figuredipicts the layout of
multiprogramming system.
Job 1
• The main memory consists of 5
Job 2 jobs at a time, the CPU executes
one by one.
Job 3
Advantages:
Job 4 •Efficient memory utilization

Job 5 •Throughput increases


•CPU is never idle, so
performance increases.
• Operating System can take control back from
the running process and can give it to other.
• When one job needs to wait for I/O, the
processor can switch to the other job
3. Multi Tasking
• Single user/Multitasking OS
▫ User performs many tasks at once
▫ Most common form of OS
▫ Windows XP and OS X
▫ Require expensive computers
▫ Tend to be complex

Digital Devices and its Applications


4.Multi Processing
• More than one processor does the work
• Eg. Dual Core processor

Digital Devices and its Applications


5. Time Sharing Systems:
• Time sharing, or multitasking, is a logical extension of
multiprogramming.
• Multiple jobs are executed by switching the CPU
between them.
• In this, the CPU time is shared by different processes, so
it is called as “Time sharing Systems”.
• Time slice is defined by the OS, for sharing CPU time
between processes.
• Examples: Multics, Unix, etc.,

Digital Devices and its Applications


• Multi user/Multitasking OS
▫ Many users connect to one computer
▫ Each user has a unique session
▫ UNIX, Linux, and VMS
▫ Maintenance can be easy
▫ Requires a powerful computer

Digital Devices and its Applications


Multi user/Multi tasking OS

You might also like