Title: Introduction to Operating System and Operating System Components
1Lecture 1
- Introduction to Operating System and Operating
System Components
2Lecture Highlights
- What is an operating system
- Definition
- Purpose and Goals
- Operating system as part of a computer system
- Operating system components
- A closer look at some critical operating system
functions - Operating system classification
3Operating System Definition
- An operating system is simply a system
application which manages user applications and
their interaction with the system hardware. - An operating is a program that acts as an
intermediary between a user of a computer and the
computer hardware. - Operating system is a resource allocator. Much of
the operating system theory concentrates on
optimal use of computing resources.
4Purpose and Goals of an operating system
- The purpose of an operating system is to provide
an environment in which a user can execute
programs - The two goals
- Make the computer system convenient to use
- Use the computer hardware in an efficient manner
5Goals of an operating systemConvenience vs.
Efficiency
- Convenience for user Operating systems exist
because they are supposed to make it easier to
compute than without one. This view is
particularly clear when you look at operating
systems for small personal computers. - Efficient operation This goal is particularly
important for large, shared multiuser systems.
These systems are typically expensive, so it is
desirable to make them as efficient as possible. - These two goals, convenience and efficiency, are
sometimes contradictory. In the past, efficiency
considerations were often more important than
convenience. Thus, much of the operating-system
theory concentrates on optimal use of computing
resources.
6Operating system as part of a computer system
- The four components of a computer system
- Hardware
- Operating system
- Application programs
- Users
7Four components of a computer system - Hardware
- It is comprised of the CPU, memory, and
input/output devices. - It provides the basic computing resources.
8Four components of a computer system
Application Programs
- They define the ways in which the hardware
resources are used to solve the computing
problems of the users. - There are many different application programs
e.g. compilers, database systems, games, business
programs, etc.
9Four components of a computer system Operating
System
- The operating system controls and coordinates the
use of the hardware among the various application
programs for the various users. - It provides an environment within which other
programs can do useful work. - It is a control program that controls the
execution of user programs to prevent errors and
improper use of the computer.
10Operating System Components
- Interface
- Process management
- Memory management
- I/O system management
- File Management
- Security / Protection System
- Networking
- Command-Interpreter System
11Operating System Components Interface
- The interface can be a fancy windows based or a
command line interpreter. The issue is usually
efficiency versus convenience. Various operating
systems try to strike a balance between the two
depending on specific needs.
12Operating System Components Process Management
- This component is related to the concept of
time multiplexing for the CPU. It aims at making
the process of switching between two programs
transparent to the user.
13Operating System Components Memory Management
- This component is tied with the concept of space
multiplexing. - It entails both main memory management as well as
secondary management.
14Operating System Components I/O System Management
- The operating system hides the peculiarities of
specific hardware devices from the user by
providing drivers for specific hardware devices
on one hand and a general device-driver interface
on the other hand.
15Operating System Components File Management
- The operating system provides a uniform logical
view of information storage. - It maps files onto physical media, and accesses
these files via the storage devices.
16Operating System Components Security/Protection
Management
- In multi-user and multitasking systems, the
various processes must be protected from one
anothers activities. For that purpose,
mechanisms are provided to ensure that the files,
memory segments, CPU, and other resources can be
operated on by only those processes that have
gained proper authorization from the operating
system.
17Operating System Components Networking
- Operating system usually generalizes network
access as a form of file access, with the details
of networking being contained in the network
interfaces device driver.
18Operating System Components Command Interpreter
System
- Command interpreter provides the interface
between the user and the operating system. - The command statements deal with process creating
and management, I/O handling, memory management,
file-system access, protection, and networking.
19Operating System ComponentsCommand Interpreter
System (..contd)
- Operating systems are frequently differentiated
in the area of command interpretation, with a
user-friendly interpreter making the system more
agreeable to some users.An example of a
user-friendly interface is the Macintosh
interpreter, a window and menu system that is
almost exclusively mouse based. Depending on the
cursor location, clicking the mouses button can
invoke a program, select a file or directory, or
pull down a menu containing commands.
20Operating System ComponentsCommand Interpreter
System (..contd)
- More powerful, complex, and difficult-to-learn
interpreters are appreciated by other, more
sophisticated users. On these interpreters,
commands are typed on a keyboard and displayed on
a screen or printing terminal, with the enter key
signaling that a command is complete and is ready
to be executed. The UNIX shells run in this mode.
21Some Critical Operating System Functions A
Closer Look
- Process Management
- Memory Management
- Input/Output Management
- General Support Functions
22Process Management A Closer Look
- Creation and Termination of processes
- Scheduling, Dispatching and Switching processes
- Synchronization, Communication and Deadlock
Avoidance
23Process Management A Closer Look
- Creation and Termination of processes
- A process is a pre-written set of ordered
instructions which when executed causes the
computer to behave in a manner determined by the
code - A process is a program in execution
- New process are spawned either by a user or by
other processes.
24Process Management A Closer Look
- Scheduling, Dispatching and Switching processes
- An operating system must select processes for
execution in some fashion. - CPU scheduling deals with the problem of deciding
which of the processes in the ready queue is to
be allocated the CPU. - The selection process is carried out by an
appropriate scheduling algorithm.
25Process Management A Closer Look
- Synchronization, Communication and Deadlock
Avoidance - Concurrent access to shared data can result in
data inconsistency. - To ensure orderly execution of processes , the
operating system provides mechanisms for job
synchronization and communication. - A deadlock state is a state of indefinite wait by
one or more processes for an event that can be
triggered only by one of the waiting processes. - Operating system also provides mechanisms to
ensure that jobs do not get stuck in a deadlock,
forever waiting for each other.
26Memory Management A Closer Look
- Memory Allocation
- Swapping
- Page and Segment Management
27Memory Management A Closer Look
- Memory management primarily deals with space
multiplexing. - All the processes need to be scheduled in such a
way that all the users get the illusion that
their processes reside on the RAM. - The job of the memory manager
- keep track of which parts of memory are in use
and which parts are not in use - to allocate memory to processes when they need it
and deallocate it when they are done - to manage swapping between main memory and disk
when main memory is not big enough to hold all
the processes.
28Input/Output Management A Closer Look
- Buffer Management
- Device Allocation
29Input/Output Management A Closer Look
- One of the purposes of an operating system is
to hide the peculiarities of specific hardware
devices from the user. For example, in UNIX, the
peculiarities of I/O devices are hidden from the
bulk of the operating system itself by the I/O
system. The I/O system consists of - A buffer-caching system
- A general device-driver interface
- Drivers for specific hardware devices
- Only the device driver knows the peculiarities
of the specific device to which it is assigned.
30General Support Functions A Closer Look
- Interrupt Handling
- Accounting
- Monitoring
31General Support Functions A Closer Look
- Interrupt Handling
- The occurrence of an event is usually signaled by
an interrupt from either the hardware or the
software. - There are many different types of events that may
trigger an interrupt, for example, the completion
of I/O operation, division by zero, invalid
memory access, and a request for some operating
system service. - For each such interrupt, a service routine is
provided that is responsible for dealing with the
interrupt.
32General Support Functions A Closer Look
- Accounting
- Accounting entails keeping track of which users
use how much and what kinds of computing
resources. - This record keeping may be for billing purposes
or simply for accumulating usage statistics. - Usage statistics may be a valuable tool for
researchers who wish to reconfigure the system to
improve computing services.
33Operating System Classification
- Operating system can be classified as follows
- Multi-user
- Multiprocessing
- Multitasking
- Multithreading
- Real time
34Multi-user operating system
- A multi-user operating system allows two or more
users to run programs at the same time. Some
operating systems permit hundreds or even
thousands of concurrent users.
35Multiprocessing Operating System
- A multiprocessing operating system supports
running a program on more than one CPU.
36Multitasking Operating System
- A multitasking operating system allows more than
one program to run concurrently.
37Multithreading Operating System
- A multithreading operating system allows
different parts of a single program to run
concurrently.
38Real time operating system
- A real time operating system responds to input
instantly. General purpose operating systems,
such as DOS and UNIX, are not real time.
39Lecture Summary
- What is an operating system
- Definition
- Purpose and Goals
- Operating system as part of a computer system
- Operating system components
- A closer look at some critical operating system
functions - Operating system classification
40Preview of next lecture
- The following topics shall be covered in the
next lecture - Process Concepts
- Performance Measures
- Evaluation Techniques