Unit 1
Unit 1
Operating system
What is an Operating System?
• What is an Operating system?
– A program that acts as an intermediate/ interface between a user of a
computer and the computer hardware.
– Resource allocator (Managing the resources efficiently)
– Control Program
• An operating system is the one program that is running at all the times on
the computer- usually called the kernel.
• Kernel is a program that (allow) let the hardware to recognize and read
the program/process.
Computer System Structure
• Computer system can be divided into four components:
*[https://www.tutorialspoint.com/operating_system/os_types.htm]
TYPES OF OS: Batch Systems
• There is no direct interaction between user and the computer.
• The user has to submit a job (written on cards or tape) to a computer
operator.
• Then computer operator places a batch of several jobs on an input device.
• Jobs are batched together by type of languages and requirements.
Disadvantages:
• No interaction between user and computer.
• No mechanism to prioritize the processes
TYPES OF OS: Batch Systems
• The common input devices were card readers and tape drives.
• The common output devices were line printers, tape drives, and card
punches.
• https://www.youtube.com/watch?v=sq2SE_GbZ34
Multiprogrammed OS
Multiprogramming: When 2 or more processes reside in memory at
the same time
– Single user processes cannot keep CPU and I/O devices busy at all
times
– Multiprogramming organizes jobs (code and data) so CPU always
has one to execute
– Multiprogramming assumes a single shared processor. One job
selected and run via job scheduling
– Multiprogramming increases CPU utilization.
– It is mixture of I/O bound and CPU bound processes
Multiprogrammed OS
• In this the operating system picks up and begins to execute one of
the jobs from memory.
• Jobs in the memory are always less than the number of jobs on
disk(Job Pool).
Multiprogrammed OS
• If several jobs are ready to run at the same time, then the system
chooses which one to run through the process of CPU Scheduling.
• 1. Soft Real time Systems: Process should complete in specific time but
May have some delay (Positive delay) and will not harm the system.
Exp: Session expires but can be re-logged in.
• Time Driven
• Task specific
21
What are the components of a
computer system?
There are four components of computer system. They are:
1. Computer Hardware – It provides computing resources to a computer
system and is composed of several units including Central Processing Unit
(CPU), Memory and Input / Output devices
2. Application programs – These are the programs which specify the
methods to solve user’s problems. Example of application programs are
word processor, compiler, spreadsheet etc.
3. Operating System – It is a software which controls the usage of
computer hardware among different application programs of different
users
4. User – A user is the person who is using the computer system
22
What is bootstrap program?
A bootstrap program is an initial program which is
started when a computer is powered on or
rebooted. The objective of a bootstrap program is
to initialize the CPU registers, device controllers,
memory contents etc. and to load and start
executing the operating system. Bootstrap
program is typically stored in read - only - memory
(ROM) of a computer system.
23
What is an interrupt?
An interrupt may be defined as an occurrence of
an event which causes the Central Processing Unit
to suspend executing current program, transfer
the control to another program called service
routine and upon completion of service routine,
resume executing the suspended program. An
interrupt may be caused by either hardware or
software.
24
Describe single processor computer
system.
A single process computer system has only one
general purpose microprocessor which can execute a
general - purpose instruction set as well as
instructions from user processes and it may contain
one or more special purpose microprocessors.
Therefore, if a computer system contains a special -
purpose microprocessor such as Input/output
microprocessor in addition to a general - purpose
microprocessor then the computer system is still
considered as a single processor computer system.
25
Describe multiprocessor computer
system.
A multiprocessor computer system contains two
or more general purpose microprocessors which
can communicate with other and share a
computer bus, memory and Input/output devices.
A multiprocessor computer system may contain
one or more special purpose microprocessors.
26
What are advantages of multiprocessor
computer system?
The advantages of multiprocessor computer system are:
●Increased efficiency – The major advantage of multiprocessor computer
system is that efficiency of the system increases because two or more
processors are involved in executing the task and therefore task gets
completed in less amount of time
●Reduced cost – When several programs are required to operate on same
set of data then a multiprocessor system costs less than an equivalent
multiple single processor computer system since a multiprocessor
computer system share peripherals and storage devices
●Increased reliability – If a task is distributed equally among the
microprocessors then failure of one microprocessor does not cause a
multiprocessor system to halt
27
What is multiprogramming?
Multiprogramming is an ability of the operating system to
execute multiple tasks such that the Central Processing Unit
(CPU) remains busy at all the time. The need of
multiprogramming arises because operating system
maintains a set of jobs in memory simultaneously and CPU
executes one task at a time but if the task requires some
I/O operation to be performed in order to be completed
then CPU has to wait until I/O operation finishes. Therefore,
in multiprogramming, instead of waiting for the I/O to
finish, CPU picks up another task from the memory and
starts executing it. In multiprogramming, a user cannot
interact with application while it is running
28
What is multitasking?
Multitasking is a version of multiprogramming
where CPU can execute multiple jobs by switching
among them, but the frequency of switching is so
fast such that a user can interact with application
while it is running. Multitasking system is also
known as a time - sharing system.
29
What is a network operating system?
A network operating system is an operating
system that provides a means of communication
such that different processes on different
machines can able to exchange information and
provides file sharing across the network. A
machine running a network operating system is
considered as an autonomous machine on the
network.
30
What are embedded systems?
Embedded systems are the computer systems
which are meant for a specific task and whose
operating system support only limited features.
These systems are used in car engines,
microwaves, washing machines etc. These systems
generally do not have a user interface and spend
most of the time monitoring and managing
hardware devices.
31
Explain real-time operating system.
Real - time operating system is an operating
system which works under given time constraints
and is used where processing must be done within
defined constraints otherwise system will crash.
Therefore, a real - time operating system is
generally used as a control device in a dedicated
application. Example of real - time operating
system are automobile fuel injection system,
home appliance controller etc.
32
What is compute-server system?
A compute - server system provides a mechanism
where a client can send the request to the server
for an action to be performed and upon receipt of
the request; server executes the action and sends
back the result to the client. An example of such
system is a server running a database that
responds to the queries sent by clients.
33