Lecture 4
Lecture 4
Hardware
2
Detail Layered View of Computer
3
Dynamic View of Computer
4
Computer Hardware Organization
5
System Software, Application
Software and Driver Programs
• System Software- Performs essential operation tasks
– Operating system
– Utility programs
• Application Software - Performs specific tasks for users
– Business application
– Communications application
– Multimedia application
– Entertainment and educational software
• Driver Programs (Device Driver)
– small program that allows a specific input or output device to communicate with the rest of
the computer system
6
3 Types of Programs
• user / application programs
– programs used by the users to perform a task
• system programs
– an interface between user and computer
• driver programs
– communicate I/O devices with computer
7
History Of Operating System
9
Operating System
• A collection of programs which control the
resources of a computer system
• Written in low-level languages (i.e. machine-
dependent)
• An interface between the users and the
hardware
• When the computer is on, OS will first load
into the main memory
10
General Definition
Application
• Another aspect for the usage
Programs
of OS is that; it is used as a
predefined library for
hardware-software System Programs
interaction.
• This is why, system programs Operating System
apply to the installed OS
since they cannot reach Machine Language
hardware directly.
HARDWARE
11
General Definition
12
General Definition
in a system where there is no OS installed, we
should consider some hardware work as:
(Assuming an MC 6800 computer hardware)
14
General Definition
A more
A simple sophisticated Hardware
program OS program segment Machine
Language
response
segment with with hardware
no hardware consideration
consideration
15
General Definition
16
General Definition
17
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
18
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
19
Services provided by an OS
• Facilities for program creation
– editors, compilers, linkers.
• Program execution
– loading in memory, I/O and file initialization.
• Access to I/O and files
– deals with the specifics of I/O and file formats.
• System access
– resolves conflicts for resource contention.
– protection in access to resources and data.
20
Views of an Operating System
• There are three classical views (in literature)
1. Resource Manager – manages and allocates
resources.
2. Control program – controls the execution of user
programs and operations of I/O devices.
3. Command Executer – Provides an environment
for running user commands.
• But one more modern view: the Operating
System as a Virtual Machine.
21
1. Resource Manager
• Resource Manager:
– Manages and protects multiple computer resources: CPU,
Processes, Internal/External memory, Tasks, Applications,
Users, Communication channels, etc…
– Handles and allocates resources to multiple users or multiple
programs running at the same time and space (e.g., processor
time, memory, I/O devices).
– Decides between conflicting requests for efficient and fair
resource use (e.g., maximize throughput, minimize response
time).
• Sort of a bottom-up view.
22
OS as a Resource Manager
23
2. Control Program
• Control Program:
– Manages all the components of a complex
computer system in an integrated manner.
– Controls the execution of user programs and
I/O devices to prevent errors and improper
use of computer resources.
– Looks over and protects the computer:
Monitor, Supervisor, Executive, Controller,
Master, Coordinator ….
• Sort of a black box view.
24
3. Command Executer
• Command Executer:
– Interfaces between the users and machine.
– Supplies services/utilities to users.
– Provides the users with a convenient CLI
(Command Language Interface), also called
a Shell (in UNIX), for entering the user
commands.
25
Modern view: Virtual Machine (1)
• Operating System as a Virtual Machine:
– An interface between the user and hardware that
hides the details of the hardware.
– Constructs higher-level (virtual) resources out of
lower-level (physical) resources (e.g., files).
– Definition: OS is a collection of software
enhancements, executed on the bare hardware,
culminating in a high-level virtual machine that
serves as an advanced programming environment.
26
Modern view: Virtual Machine (2)
27
Why are Operating Systems Important?
• Important to understand and know how to correctly
use when writing user applications.
• Large and complex systems that have a high
economic impact and result in interesting problems
of management.
• Few actually involved in OS design and
implementation but nevertheless many general
techniques to be learned and applied.
• Combines concepts from many other areas of
Computer Science: Architecture, Languages,
Data Structures, Algorithms, etc.
28
Good Operating System
• Efficient
– time spent to execute its programs should be
short
• Small in size
– memory occupied should be as small as
possible
• Reliable
29
Special Features of OS
• Multi-tasking
• Multi-programming
• Parallel processing
• Buffering
• Spooling
30
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
31
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
32
Parallel Processing
• Use 2 or more CPUs to handle jobs
• Computer networking without multiprocessing
Job 3
Job 4
Job 2
time Job 3 time
Job 1
Job 1 Job 2
34
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
35
Type of Operating System
• Batch processing
• Real time processing
• Time sharing processing
36
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
37
Real time processing
• Immediate response is needed.
• For example
– anti-missile defense system
– airplane landing control system
– interrupt error in computer system
38
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.
39
40
Common Operating Systems and
Their Differences
42
Different Types of Operating System
43
MS-DOS
• The Microsoft Disk Operating System, MS-DOS, is a traditional
microcomputer operating system that consists of four major components.
The Operating-system loader
- It brings the operating system from the startup into RAM.
45
Windows 98
Graphical operating system by Microsoft.
46
Windows 2000
A line of operating systems produced by Microsoft for use on
personal computers, business desktops, laptops, and servers.
47
WINDOWS XP
48
WINDOWS VISTA
49
WINDOWS 7
Windows 7 is a version of Microsoft Windows, a series of operating
systems produced by Microsoft for use on personal computers
Came in less than three years after the release of Windows Vista.
50
Unix Operating System
• Manages the resources (CPU and I/O) present in the
computer
• Unix is a true multi-user operating system
• The primary user interface with Unix is through a
command line interface (terminal console)
• It has several GUI interfaces available, all built on X-
windows
• Integrated networking capabilities
• Unix was conceived at AT&T Bell Labs in the late 60’s
• The C language was developed shortly thereafter to
support Unix
• UC Berkeley created a new variant that included
networking in the late 70’s, known as BSD 51
History
• Multics – 1964
• Unics – 1969
• Minix – 1990
• Linux – 1991
52
Multics
• Multiplexed Information and Computing
Service
• Written in 1964
• Timesharing OS
• Last version was shut down on October 30,
2008
• Monolithic kernel
53
Unics
• Uniplexed Information and Computing System
• Later renamed as UNIX
• Written in 1969
• Ken Thompson, Dennis Ritchie were among
the developers
• Multi user, Multi tasking and timesharing
• Monolithic kernel
54
Minix
• Minimal Unix
• Tanenbaum developed this OS
• Mainly for educational purpose
• Unix like OS, implemented with Micro
kernel. So the name Minix
55
Linux
• Developed in 1991 by Linus Torvalds
• Used in most of the computers, ranging from super
computers to embedded system
• Multi user
• Multi tasking
• Time sharing
• Monolithic kernel
• Latest stable version of linux kernel – 2.6.28, released
on 24-Dec-2008
56
Thanks…
57