Concept of Operating system:-
An operating system acts as an intermediary between the user of a computer and computer hardware. The
purpose of an operating system is to provide an environment in which a user can execute programs
conveniently and efficiently.
An operating system is a software that manages computer hardware. The hardware must provide
appropriate mechanisms to ensure the correct operation of the computer system and to prevent user
programs from interfering with the proper operation of the system.
The operating system operates either in kernel mode or user mode. Compilers and editors run in user mode,
whereas operating system code runs in kernel mode.
Generations of operating systems:-
Operating Systems have evolved over the years. So, their evolution through the years can be mapped using
generations of operating systems. There are four generations of operating systems. These can be described
as follows −
The First Generation (1945 - 1955): Vacuum Tubes and Plug boards
Digital computers were not constructed until the Second World War. Calculating engines with mechanical
relays were built at that time. However, the mechanical relays were very slow and were later replaced with
vacuum tubes. These machines were enormous but were still very slow.
These early computers were designed, built and maintained by a single group of people. Programming
languages were unknown and there were no operating systems so all the programming was done in machine
language. All the problems were simple numerical calculations.
By the 1950’s punch cards were introduced and this improved the computer system. Instead of using plug
boards, programs were written on cards and read into the system.
The Second Generation (1955 - 1965): Transistors and Batch Systems
Transistors led to the development of the computer systems that could be manufactured and sold to paying
customers. These machines were known as mainframes and were locked in air-conditioned computer
rooms with staff to operate them.
The Batch System was introduced to reduce the wasted time in the computer. A tray full of jobs was
collected in the input room and read into the magnetic tape. After that, the tape was rewound and mounted
on a tape drive. Then the batch operating system was loaded in which read the first job from the tape and
ran it. The output was written on the second tape. After the whole batch was done, the input and output
tapes were removed and the output tape was printed.
The Third Generation (1965 - 1980): Integrated Circuits and Multiprogramming
Until the 1960’s, there were two types of computer systems i.e. the scientific and the commercial
computers. These were combined by IBM in the System/360. This used integrated circuits and provided a
major price and performance advantage over the second generation systems.
The third generation operating systems also introduced multiprogramming. This meant that the processor
was not idle while a job was completing its I/O operation. Another job was scheduled on the processor so
that its time would not be wasted.
The Fourth Generation (1980 - Present): Personal Computers
Personal Computers were easy to create with the development of large-scale integrated circuits. These
were chips containing thousands of transistors on a square centimeter of silicon. Because of these,
microcomputers were much cheaper than minicomputers and that made it possible for a single individual
to own one of them.
The advent of personal computers also led to the growth of networks. This created network operating
systems and distributed operating systems. The users were aware of a network while using a network
operating system and could log in to remote machines and copy files from one machine to another.
Types of operating system:-
An Operating System performs all the basic tasks like managing files, processes, and memory. Thus
operating system acts as the manager of all the resources, i.e. resource manager. Thus, the operating
system becomes an interface between user and machine.
Some widely used operating systems are as follows-
1. Batch Operating System –
This type of operating system does not interact with the computer directly. There is an operator which
takes similar jobs having the same requirement and group them into batches. It is the responsibility of the
operator to sort jobs with similar needs.
Advantages of Batch Operating System:
It is very difficult to guess or know the time required for any job to complete. Processors of the
batch systems know how long the job would be when it is in queue
Multiple users can share the batch systems
The idle time for the batch system is very less
It is easy to manage large work repeatedly in batch systems
Disadvantages of Batch Operating System:
The computer operators should be well known with batch systems
Batch systems are hard to debug
It is sometimes costly
The other jobs will have to wait for an unknown time if any job fails
Examples of Batch based Operating System: Payroll System, Bank Statements, etc.
2. Time-Sharing Operating Systems –
Each task is given some time to execute so that all the tasks work smoothly. Each user gets the time of
CPU as they use a single system. These systems are also known as Multitasking Systems. The task can
be from a single user or different users also. The time that each task gets to execute is called quantum.
After this time interval is over OS switches over to the next task.
Advantages of Time-Sharing OS:
Each task gets an equal opportunity
Fewer chances of duplication of software
CPU idle time can be reduced
Resource Sharing: Time-sharing systems allow multiple users to share hardware resources such as
the CPU, memory, and peripherals, reducing the cost of hardware and increasing efficiency.
Improved Productivity: Time-sharing allows users to work concurrently, thereby reducing the
waiting time for their turn to use the computer. This increased productivity translates to more work
getting done in less time.
Improved User Experience: Time-sharing provides an interactive environment that allows users to
communicate with the computer in real-time, providing a better user experience than batch
processing.
Disadvantages of Time-Sharing OS:
Reliability problem
One must have to take care of the security and integrity of user programs and data
Data communication problem
High Overhead: Time-sharing systems have a higher overhead than other operating systems due
to the need for scheduling, context switching, and other overheads that come with supporting
multiple users.
Complexity: Time-sharing systems are complex and require advanced software to manage
multiple users simultaneously. This complexity increases the chance of bugs and errors.
Security Risks: With multiple users sharing resources, the risk of security breaches increases.
Time-sharing systems require careful management of user access, authentication, and
authorization to ensure the security of data and software.
Examples of Time-Sharing OSs are: Multics, UNIX, etc.
Examples of Time-Sharing OS with explanation:
IBM VM/CMS: IBM VM/CMS is a time-sharing operating system that was first introduced in
1972. It is still in use today, providing a virtual machine environment that allows multiple users to
run their own instances of operating systems and applications.
TSO (Time Sharing Option): TSO is a time-sharing operating system that was first introduced
in the 1960s by IBM for the IBM System/360 mainframe computer. It allowed multiple users to
access the same computer simultaneously, running their own applications.
Windows Terminal Services: Windows Terminal Services is a time-sharing operating system
that allows multiple users to access a Windows server remotely. Users can run their own
applications and access shared resources, such as printers and network storage, in real-time.
3. Distributed Operating System –
These types of the operating system is a recent advancement in the world of computer
technology and are being widely accepted all over the world and, that too, with a great pace.
Various autonomous interconnected computers communicate with each other using a shared
communication network. Independent systems possess their own memory unit and CPU. These
are referred to as loosely coupled systems or distributed systems. These system’s processors
differ in size and function. The major benefit of working with these types of the operating system
is that it is always possible that one user can access the files or software which are not actually
present on his system but some other system connected within this network i.e., remote access is
enabled within the devices connected in that network.
Advantages of Distributed Operating System:
Failure of one will not affect the other network communication, as all systems are independent
from each other
Electronic mail increases the data exchange speed
Since resources are being shared, computation is highly fast and durable
Load on host computer reduces
These systems are easily scalable as many systems can be easily added to the network
Delay in data processing reduces
Disadvantages of Distributed Operating System:
Failure of the main network will stop the entire communication
To establish distributed systems the language which is used are not well defined yet
These types of systems are not readily available as they are very expensive. Not only that the
underlying software is highly complex and not understood well yet
Examples of Distributed Operating System are- LOCUS, etc.
4. Network Operating System –
These systems run on a server and provide the capability to manage data, users, groups, security,
applications, and other networking functions. These types of operating systems allow shared access of
files, printers, security, applications, and other networking functions over a small private network. One
more important aspect of Network Operating Systems is that all the users are well aware of the
underlying configuration, of all other users within the network, their individual connections, etc. and
that’s why these computers are popularly known as tightly coupled systems.
Advantages of Network Operating System:
Highly stable centralized servers
Security concerns are handled through servers
New technologies and hardware up-gradation are easily integrated into the system
Server access is possible remotely from different locations and types of systems
Disadvantages of Network Operating System:
Servers are costly
User has to depend on a central location for most operations
Maintenance and updates are required regularly
Examples of Network Operating System are: Microsoft Windows Server 2003, Microsoft Windows
Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD, etc.
5. Real-Time Operating System –
These types of OSs serve real-time systems. The time interval required to process and respond to inputs
is very small. This time interval is called response time.
Real-time systems are used when there are time requirements that are very strict like missile systems, air
traffic control systems, robots, etc.
Two types of Real-Time Operating System which are as follows:
Hard Real-Time Systems:
These OSs are meant for applications where time constraints are very strict and even the shortest
possible delay is not acceptable. These systems are built for saving life like automatic parachutes
or airbags which are required to be readily available in case of any accident. Virtual memory is
rarely found in these systems.
Soft Real-Time Systems:
These OSs are for applications where for time-constraint is less strict.
Advantages of Real Time Operating System:
Maximum Consumption: Maximum utilization of devices and system, thus more output from all
the resources
Task Shifting: The time assigned for shifting tasks in these systems are very less. For example,
in older systems, it takes about 10 microseconds in shifting one task to another, and in the latest
systems, it takes 3 microseconds.
Focus on Application: Focus on running applications and less importance to applications which
are in the queue.
Real-time operating system in the embedded system: Since the size of programs are small,
RTOS can also be used in embedded systems like in transport and others.
Error Free: These types of systems are error-free.
Memory Allocation: Memory allocation is best managed in these types of systems.
Disadvantages of Real Time Operating System:
Limited Tasks: Very few tasks run at the same time and their concentration is very less on few
applications to avoid errors.
Use heavy system resources: Sometimes the system resources are not so good and they are
expensive as well.
Complex Algorithms: The algorithms are very complex and difficult for the designer to write on.
Device driver and interrupt signals: It needs specific device drivers and interrupts signals to
respond earliest to interrupts.
Thread Priority: It is not good to set thread priority as these systems are very less prone to
switching tasks.
Examples of Real-Time Operating Systems are: Scientific experiments, medical imaging systems,
industrial control systems, weapon systems, robots, air traffic control systems, etc.
Operating system services:-
The operating system provides the programming environment in which a programmer works on a computer
system. The user program requests various resources through the operating system. The operating system
gives several services to utility programmers and users. Applications access these services through
application programming interfaces or system calls. By invoking those interfaces, the application can
request a service from the operating system, pass parameters, and acquire the operation outcomes.
Following are the services provided by an operating system -
Program execution
Input/output Operations
Program creation
Error Detection and Response
Security and Protection
Resource Management
Communication between processes
Program Execution: - It is the Operating System that manages how a program is going to be executed. It
loads the program into the memory after which it is executed. The order in which they are executed depends
on the CPU Scheduling Algorithms. A few are FCFS, SJF, etc. When the program is in execution, the
Operating System also handles deadlock i.e. no two processes come for execution at the same time. The
Operating System is responsible for the smooth execution of both user and system programs. The
Operating System utilizes various resources available for the efficient running of all types of
functionalities.
A process includes the complete execution context (code to execute, data to manipulate, registers, OS
resources in use). Following are the major activities of an operating system with respect to program
management −
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.
Input/output Operations: - Operating System manages the input-output operations and establishes
communication between the user and device drivers. Device drivers are software that is associated with
hardware that is being managed by the OS so that the sync between the devices works properly. It also
provides access to input-output devices to a program when needed.
Program Creation
The Operating system offers the structures and tools, including editors and debuggers, to help the
programmer create, modify, and debugging programs.
Error Detection and Response
An Error in a device may also cause malfunctioning of the entire device. These include hardware and
software errors such as device failure, memory error, division by zero, attempts to access forbidden
memory locations, etc. To avoid error, the operating system monitors the system for detecting errors and
takes suitable action with at least impact on running applications.
While working with computers, errors may occur quite often. Errors may occur in the:
Input/ Output devices: For example, connection failure in the network, lack of paper in the
printer, etc.
User program: For example: attempt to access illegal memory locations, divide by zero, use too
much CPU time, etc.
Memory hardware: For example, Memory error, the memory becomes full, etc.
To handle these errors and other types of possible errors, the operating system takes appropriate action and
generates messages to ensure correct and consistent computing.
Resource Management:
System resources are shared between various processes. It is the Operating system that manages resource
sharing. It also manages the CPU time among processes using CPU Scheduling Algorithms. It also helps
in the memory management of the system. It also controls input-output devices. The OS also ensures the
proper use of all the resources available by deciding which resource to be used by whom.
Communication between Processes:
The Operating system manages the communication between processes. Communication between processes
includes data transfer among them. If the processes are not on the same computer but connected through a
computer network, then also their communication is managed by the Operating System itself.
Security and Protection:
In an operating system, protection is a mechanism that controls the access of the process, programs, or
users over any resources of the computer system. The operating system ensures that all access to system
resources must be monitored and controlled. It also ensures that the external resources or peripherals must
be protected from invalid access. It provides authentication by using usernames and passwords.