Operating System Overview MN Oct 2015 DESD
Operating System Overview MN Oct 2015 DESD
Evolution
• 1945-55
Courtesy : wikipedia
• mv <fromfile> <tofile>
• rm <file>
• mkdir <newdir>
• rmdir <dir>
PATH=$PATH:/usr/X11R6/bin
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
PS1="\u@\h \W"
OS MM Functions:
• Keeps tracks of primary memory i.e. what part of it are in use by
whom, what part are not in use.
• In multiprogramming, OS decides which process will get memory
when and how much.
• Allocates the memory when the process requests it to do so.
• De-allocates the memory when the process no longer needs it or
has been terminated
Processor Management
In multiprogramming environment, OS decides
which process gets the processor when and how
much time. This function is called process
scheduling.
Operating System processor management functions
• Keeps tracks of processor and status of process.
Program responsible for this task is known as traffic
controller.
• Allocates the processor (CPU) to a process.
• De-allocates processor when processor is no longer
required.
Device Management
OS manages device communication via their
respective drivers.
Operating System device management
• Keeps tracks of all devices. Program responsible for
this task is known as the I/O controller.
• Decides which process gets the device when and for
how much time.
• Allocates the device in the efficient way.
• De-allocates devices
File Management
A file system is normally organized into directories
for easy navigation and usage. These directories
may contain files and other directions.
Operating System file management
• Keeps track of information, location, uses, status
etc. The collective facilities are often known as file
system.
• Decides who gets the resources.
• Allocates the resources.
• De-allocates the resources.
Other Important Functions
• Security -- By means of password and similar other
techniques, preventing unauthorized access to programs
and data.
• Control over system performance -- Recording delays
between request for a service and response from the
system.
• Job accounting -- Keeping track of time and resources
used by various jobs and users.
• Error detecting aids -- Production of dumps, traces, error
messages and other debugging and error detecting aids.
• Coordination between other software and users --
Coordination and assignment of compilers, interpreters,
assemblers and other software to the various users of
the computer systems
Types of OS
• Batch OS
• Single / Multi tasking
• Single / Multi User
• Time Sharing OS
• Distributed OS
• Network OS
• Real Time OS
Batch OS
• The users of batch operating system do 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. To speed up
processing, jobs with similar needs are batched
together and run as a group
• Lack of interaction between the user and job.
• CPU is often idle, because the speeds of the
mechanical I/O devices are slower than CPU.
• Difficult to provide the desired priority
Single/Multi-Task & Single/Multi-User
• Single Task - run one program at a time, while a multi-
tasking operating system allows more than one program to
run concurrently by time-sharing
• Single-user - have no facilities to distinguish users, but may
allow multiple programs to run in tandem
• Multi-user - extends the basic concept of multi-tasking with
facilities that identify processes and resources, such as disk
space, belonging to multiple users, and the system permits
multiple users to interact with the system at the same time
Time Sharing OS
• Time sharing is a technique which enables many
people, located at various terminals, to use a
particular computer system at the same time. Time-
sharing or multitasking is a logical extension of
multiprogramming.
• Time-Sharing Systems objective is to minimize
response time
• Problem of reliability.
• Question of security and integrity of user programs
and data.
• Problem of data communication
Distributed OS
• Distributed systems use multiple central processors to
serve multiple real time application and multiple users.
• The processors communicate with one another through
various communication lines.
• Loosely coupled systems or distributed systems.
Processors in a distributed system may vary in size and
function. These processors are referred as sites, nodes,
and computers etc.
• With resource sharing facility user at one site may be
able to use the resources available at another.
• If one site fails the remaining sites can continue
operating.
• Reduction of the load on the host computer
Network OS
• Network Operating System runs on a server and provides server
the capability to manage data, users, groups, security,
applications, and other networking functions.
• The primary purpose of the network operating system is to allow
shared file and printer access among multiple computers in a
network
• E.g. Windows Server 2003/8, UNIX
Advantages
• Centralized servers are highly stable.
• Security is server managed.
• Upgrades are easy.
Disadvantages
• High cost of buying and running a server.
• Dependency on a central location for most operations.
• Regular maintenance and updates are required
Real Time OS
• guarantees to process events or data within a certain short amount of
time
• Rigid time requirements on the operation of a processor or the flow of
data- otherwise system will fail
• E.g. Scientific experiments, medical imaging systems, industrial control
systems, weapon systems, robots, and home-appliance controllers, Air
traffic control system etc
• uses specialized scheduling algorithms so that a deterministic nature of
behavior is achieved (in case of multi tasking)
• Event-driven RT system switches between tasks based on their priorities
or external events while time-sharing OS switch tasks based on clock
interrupts
• Hard real-time systems guarantee that critical tasks complete on time. In
hard real-time systems secondary storage is limited or missing with data
stored in ROM. In these systems virtual memory is almost never found
• Soft real time systems are less restrictive. Critical real-time task gets
priority over other tasks. E.g. Multimedia, virtual reality, Advanced
Scientific Projects like undersea exploration and planetary rovers etc
Embedded OS
• Embedded operating systems are designed to be used
in embedded computer systems.
• Designed to operate on small machines like PDAs.
• They are able to operate with a limited number of resources.
• They are very compact and extremely efficient by design.
• Windows CE and Minix 3 are some examples of embedded
operating systems.
OS Functionality
Program Execution
• Loads a program into memory.
• Executes the program.
• Handles program's execution.
• Provides a mechanism for process synchronization.
• Provides a mechanism for process communication.
• Provides a mechanism for deadlock handling.
Process Management
• A process is a program in execution. It is a unit of work within the
system. Program is a passive entity, process is an active entity.
• Process needs resources to accomplish its task
– CPU, memory, I/O, files
– Allocation of resources when process is created or when process is
running
– process also requires initialization data
• Process termination requires reclaim of any reusable resources
• Single-threaded process has one program counter specifying
location of next instruction to execute
– Process executes instructions sequentially, one at a time, until
completion
• Multi-threaded process has one program counter per thread
• Typically system has many processes, some user, some operating
system running concurrently on one or more CPUs
– Concurrency by multiplexing the CPUs among the processes / threads
• I/O operation means read or write operation with any file or any specific
I/O device.
• Program may require any I/O device while running.
• Operating system provides the access to the required I/O device when
required.
Thank You