Operatin
g
Systems: Lesson 2
Operating
System Overview
By Lawrence Njoroge
Operating Systems:
Operating systems are those programs that interface the machine with
the applications programs. The main function of these systems is to
dynamically allocate the shared system resources to the executing
programs. As such, research in this area is clearly concerned with
the management and scheduling of memory, processes, and other
devices. But the interface with adjacent levels continues to shift with
time. Functions that were originally part of the operating system have
migrated to the hardware. On the other side, programmed functions
extraneous to the problems being solved by the application programs
are included in the operating system.
—WHAT CAN BE AUTOMATED?: THE COMPUTER SCIENCE AND
ENGINEERING RESEARCH STUDY,
MIT Press, 1980
Operating System
A program that controls the execution of application
programs
An interface between applications and hardware
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.,
What OS does?
An operating system performs basic tasks such as,
• controlling and allocating memory,
• prioritizing system requests,
• controlling input and output devices,
• facilitating networking and
• managing file systems.
Structure of Operating System
Application
Programs
System Programs
Software (Operating
System)
HARDWARE
(Contd
Structure of Operating System (Contd…):
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.
Structure of Operating System (Contd…):
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.,
Stand-Alone Operating
Systems
A stand-alone operating system is a complete operating
system that works on a desktop computer, notebook computer,
or mobile computing device
Window Mac OS
s7 X
Page 412 UNIX Discovering Computers 2012: Chapter 8 Linux 8
Server Operating
Systems
Windows
Server 2008 UNIX
Linux Solaris
Pages 417 - 418 Discovering Computers 2012: Chapter 8 9
Embedded Operating
Systems
An embedded operating system resides on
a ROM chip on a mobile device or consumer
Windows
electronic device Windows
Embedded
CE Phone 7
iPhone
Palm OS
Pages 418 - 420 Discovering Computers 2012: Chapter 8 10
Evolution of
Operating Systems
A major OS will evolve over time
for a number of reasons:
Hardware upgrades
New types of hardware
New services
Fixes
Evolution of OS:
The evolution of operating systems went through
seven major phases.
Six of them significantly changed the ways in
which users accessed computers through the
open shop, batch processing, multiprogramming,
timesharing, personal computing, and distributed
systems.
In the seventh phase the foundations of
concurrent programming were developed and
demonstrated in model operating systems.
Evolution of OS (contd..):
Major Phases Technical Innovations Operating Systems
Open Shop The idea of OS IBM 701 open shop
(1954)
Batch Processing Tape batching, BKS system (1961)
First-in, first-out
scheduling.
Multi- Processor multiplexing, Atlas supervisor
programming Indivisible operations, (1961),
Demand paging, Exec II system (1966)
Input/output spooling,
Priority scheduling, (Contd…)
Remote job entry
Evolution of OS (contd..):
Timesharing Simultaneous user Multics file system (1965),
interaction, Unix (1974)
On-line file systems
Concurrent Hierarchical systems, RC 4000 system (1969),
Programming Extensible kernels, Parallel 13 Venus system (1972),
programming concepts, 14 Boss 2 system (1975).
Secure parallel languages
Personal Computing Graphic user interfaces OS 6 (1972)
Pilot system (1980)
Distributed Systems Remote servers WFS file server (1979)
Unix United RPC (1982)
24 Amoeba system (1990)
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 OS was simple, its major task was to transfer
control from one job to the next.
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
Batch Processing (Contd…):
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
progra
m area
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 a process, then CPU
switches from that job to another job.
Hence CPU in not idle at any time.
Multiprogramming (Contd…):
OS • Figure dipicts the layout of
multiprogramming system.
Job 1
• The main memory consists of
Job 2 5 jobs at a time, the CPU
executes one by one.
Job 3 Advantages:
• Efficient memory utilization
Job 4 • Throughput increases
Job 5 • CPU is never idle, so
performance increases.
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.,
Types of OS:
Operating System can also be
classified as,-
Single User Systems
Multi User Systems
Single User Systems:
Provides a platform for only one user at a
time.
They are popularly associated with Desk Top
operating system which run on standalone
systems where no user accounts are
required.
Example: DOS
Multi-User Systems:
Provides regulated access for a number of users
by maintaining a database of known users.
Refers to computer systems that support two or
more simultaneous users.
Another term for multi-user is time sharing
Ex: All mainframes and are multi-user systems.
Example: Unix
Objectives of Operating System
Convenience: makes computer user friendly.
Efficiency: allows computer to use resources efficiently.
Ability to evolve: constructed in a way to permit
effective development, testing and introduction of new
functions without interfering with service
Basic functions of the
operating system
Device configuration
Controls peripheral devices connected to the computer
File management
Transfers files between main memory and secondary
storage, manages file folders, allocates the secondary
storage space, and provides file protection and
Operating recovery
System
Memory management
Allocates the use of random access memory (RAM) to
requesting processes
Interface platform
Allows the computer to run other applications
Other function of Operating System
Best use of the computer resources
Provide a background for user’s programs to execute
Display and deal with errors when it happens
Control the selection and operation of the peripherals
Act as a communication link between users
System protection
Type of Operating System
Batch processing
Real time processing
Time sharing processing
Batch Processing
Jobs, together with input data, are fed into the system in
a batch.
The jobs are then run one after another.
No job can be started until previous job is completed
Real time
processing
Immediate response is needed.
For example
anti-missile defense system
airplane landing control system
interrupt error in computer system
Time sharing
processing
Each user is given a time slice to interact with the CPU.
The size of the time slice will depend on the system.
Each user is served in sequence.
Special Features of OS
multi-tasking
multi-programming
parallel processing
buffering
spooling
Multi-tasking
to handle 2 or more programs at the same
time from a single user ‘s perception
CPU can only perform one task at a time,
however, it runs so fast that 2 or more jobs
seem to execute at the same time
Multi-programming
2 or more programs store in the main
memory at the same time
when one job reeds to wait (e.g. I/O
operation), CPU switch to another job to
execute
when the first job finishes waiting, CPU will
get back the first job to execute
Parallel Processing
use 2 or more CPUs to handle jobs
computer networking without
multiprocessing
with multiprocessing Job
4
Job
Job 3
4 Job
tim Job tim
e e 2
3 Job
Job Job
1
1 2
CPU 1 CPU 2 CPU 1
Buffering
a temporary storage area (buffers) to read
data from input device or send data to the
output device
keep CPU busy
because I/O operation is slow
Spooling
a larger buffer from hard disk
buffer store the data through I/O operation
because I/O operation is slow and CPU
operation is fast
Characteristics of Modern
Operating Systems
Microkernel architecture-assigns only a few essential
functions to the kernel, including address spaces,
interprocess communication, and basic scheduling.
Multithreading- the process is divided into threads that can
run simultaneously
Thread- dispatchable unit of work. It includes a processor
context program counter and stack pointer and its own data
storage for the stack. It executes sequentially and is
interruptable
Process- collection of one or more threads and associated
system resources.
Characteristics of Modern Operating
Systems
Symmetric multiprocessing- standalone computer with
multiple processors that share the same memory and I/O
facilities connected by a communication bus. All processors
can perform the same functions
Distributed operating systems - provide the illusion of a
single main memory and single secondary memory space.
Used for distributed file system
Object-oriented design - used for adding modular
extensions to a small kernel. Enables programmers to
customize an operating system without disrupting system
integrity
Providing a User
Interface
User interface
How a user interacts with a computer
Require different skill sets
Providing a User
Interface
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
Graphical User
Interface
Providing a User
Interface
Command line interfaces
Older interface
DOS, Linux, UNIX
User types commands at a prompt
User must remember all commands
Included in all GUIs
Command Line
Interface
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
Managing Hardware
Programs need to access hardware
Interrupts
CPU is stopped
Hardware device is accessed
Device drivers control the hardware
Organizing Files and
Folders
Organized storage
Long file names
Folders can be created and nested
All storage devices work consistently
Enhancing an OS
Utilities
Provide services not included with OS
Goes beyond the four functions
Firewall, anti-virus and compression
Prices vary
Enhancing an OS
Backup software
Archives files onto removable media
Ensures data integrity
Most OS include a backup package
Many third party packages exist
Backup Software
Enhancing an OS
Anti-virus software
Crucial utility
Finds, blocks and removes viruses
Must be updated regularly
McAfee and Norton Anti-Virus
Enhancing an OS
Firewall
Crucial utility
Protects your computer from intruders
Makes computer invisible to hackers
Zone Labs is a home firewall
Cisco sells hardware firewalls
Enhancing an OS
Intrusion detection
Often part of a firewall package
Announces attempts to breach security
Snort is a Linux based package
Enhancing an OS
Screen savers
Crucial utility for command line systems
Prevents burn in
Merely fun for GUI systems
Screen saver decorates idle screens