Unit I, II Os 1 14
Unit I, II Os 1 14
Unit I, II Os 1 14
Syllabus: What is Operating System? History and Evolution of OS, Basic OS functions,
Resource Abstraction, Types of Operating Systems– Multiprogramming Systems, Batch
Systems, Time Sharing Systems; Operating Systems for Personal Computers, Workstations
and Hand-held Devices, Process Control & Real time Systems.
Definition OS
Operating System can be defined as an interface between user and the hardware. It provides an
environment to the user so that, the user can perform its task in convenient and efficient way.
The operating system is a system program that serves as an interface between the
computing system and the end-user. Operating systems create an environment where the
user can run any programs or communicate with software or applications in a
comfortable and well-organized way.
Furthermore, an operating is a software program that manages and controls the execution
of application programs, software resources and computer hardware.
It also helps manage the software/hardware resource, such as file management, memory
management, input/ output and many peripheral devices like a disk drive, printers, etc.
These are the popular operating system: Linux OS, Windows OS, Mac OS, VMS,
OS/400 etc.
An operating system is a program that acts as a user-computer GUI (Graphical user interface).
It controls the execution of all types of applications.
1. Instruction
2. Input/output Management
3. Memory Management
4. File Management
5. Processor Management
6. Job Priority
7. Special Control Program
8. Scheduling of resources and jobs
9. Security
10. Monitoring activities
11. Job accounting
Input/output Management:
What output will come from the input given by the user, the operating system runs this
program.
This management involves coordinating various input and output devices.
It assigns the functions of those devices where one or more applications are executed.
Memory Management:
The operating system handles the responsibility of storing any data, system programs,
and user programs in memory.
This function of the operating system is called memory management.
File Management:
The operating system is helpful in making changes in the stored files and in replacing
them.
It also plays an important role in transferring various files to a device.
Processor Management:
The processor is the execution of a program that accomplishes the specified work in that
program.
It can be defined as an execution unit where a program runs.
Job Priority:
The operating systems make automatic changes to the task through specific control
programs.
These programs are called Special Control Program.
Scheduling of resources and jobs:
The operating system prepares the list of tasks to be performed for the device of the
computer system.
The operating system decides which device to use for which task.
This action becomes complicated when multiple tasks are to be performed
simultaneously in a computer system.
The scheduling programs of the operating system determine the order in which tasks are
completed.
It performs these tasks based on the priority of performing the tasks given by the user.
It makes the tasks available based on the priority of the device.
Security:
Monitoring activities:
The operating system takes care of the activities of the computer system during various
processes.
This aborts the program if there are errors.
The operating system sends instant messages to the user for any unexpected error in the
input/output device.
It also provides security to the system when the operating system is used in systems
operated by multiple users. So that illegal users cannot get data from the system.
Job accounting: It keeps track of time & resources used by various jobs and users.
In the 1970s, Batch processing was very popular. In this technique, similar types of jobs
were batched together and executed in time. People were used to having a single
computer which was called a mainframe.
In Batch operating system, access is given to more than one person; they submit their
respective jobs to the system for the execution.
The system put all of the jobs in a queue on the basis of first come first serve and then
executes the jobs one by one.
The users collect their respective output when all the jobs get executed.
The purpose of this operating system was mainly to transfer control from one job to
another as soon as the job was completed.
It contained a small set of programs called the resident monitor that always resided in
one part of the main memory.
The remaining part is used for servicing jobs.
Advantages of Batch OS
o The use of a resident monitor improves computer efficiency as it eliminates CPU time
between two jobs.
Disadvantages of Batch OS
1. Starvation
For Example:
There are five jobs J1, J2, J3, J4, and J5, present in the batch. If the execution time of J1 is very
high, then the other four jobs will never be executed, or they will have to wait for a very long
time. Hence the other processes get starved.
2. Not Interactive
Batch Processing is not suitable for jobs that are dependent on the user's input. If a job requires
the input of two numbers from the console, then it will never get it in the batch processing
scenario since the user is not present at the time of execution.
Disadvantages of Multiprogramming OS
o Multiprogramming systems provide an environment in which various systems resources
are used efficiently, but they do not provide any user interaction with the computer
system.
o In Real-Time Systems, each job carries a certain deadline within which the job is
supposed to be completed, otherwise, the huge loss will be there, or even if the result is
produced, it will be completely useless.
o The Application of a Real-Time system exists in the case of military applications, if you
want to drop a missile, then the missile is supposed to be dropped with a certain
precision.
o In the Time Sharing operating system, computer resources are allocated in a time-
dependent fashion to several programs simultaneously.
o Thus it helps to provide a large number of user's direct access to the main computer.
o It is a logical extension of multiprogramming.
o In time-sharing, the CPU is switched among multiple programs given by different users
on a scheduled basis.
A time-sharing operating system allows many users to be served simultaneously, so
sophisticated CPU scheduling schemes and Input/output management are required.
o The Distributed Operating system is not installed on a single machine, it is divided into
parts, and these parts are loaded on different machines.
o A part of the distributed Operating system is installed on each machine to make their
communication possible. Distributed Operating systems are much more complex, large,
and sophisticated than Network operating systems because they also have to take care of
varying networking protocols.
Advantages of Distributed Operating System
It is employed mostly in those systems in which the results of the computations are used
to influence a process while it is executing. Whenever an event external to the computer
occurs,
it is communicated to the computer with the help of some sensor used to monitor the
event.
The sensor produces the signal that is interpreted by the operating system as an
interrupt.
On receiving an interrupt, the operating system invokes a specific process or a set of
processes to serve the interrupt.
The various examples of Real-time operating systems are:
o MTS
o Lynx
o QNX
o VxWorks etc.
RTOS is used in real-time applications that must work within specific deadlines. Following are
the common areas of applications of Real-time operating systems are given below.
In Hard RTOS, all critical tasks must be completed within the specified time duration, i.e.,
within the given deadline. Not meeting the deadline would result in critical failures such as
damage to equipment or even loss of human life.
For Example,
Let's take an example of airbags provided by carmakers along with a handle in the driver's seat.
When the driver applies brakes at a particular instance, the airbags grow and prevent the
driver's head from hitting the handle. Had there been some delay even of milliseconds, then it
would have resulted in an accident.
Similarly, consider an on-stock trading software. If someone wants to sell a particular share, the
system must ensure that command is performed within a given critical time. Otherwise, if the
market falls abruptly, it may cause a huge loss to the trader.
Soft RTOS accepts a few delays via the means of the Operating system. In this kind of RTOS,
there may be a closing date assigned for a particular job, but a delay for a small amount of time
is acceptable. So, cut off dates are treated softly via means of this kind of RTOS.
For Example,
This type of system is used in Online Transaction systems and Livestock price quotation
Systems.
o Easy to layout, develop and execute real-time applications under the real-time operating
system.
o The real-time working structures are extra compact, so those structures require much less
memory space.
o In a Real-time operating system, the maximum utilization of devices and systems.
o Focus on running applications and less importance to applications that are in the queue.
o Since the size of programs is small, RTOS can also be embedded systems like in
transport and others.
o These types of systems are error-free.
o Memory allocation is best managed in these types of systems.
o Real-time operating systems have complicated layout principles and are very costly to
develop.
o Real-time operating systems are very complex and can consume critical CPU cycles.