Operating System
As the name suggests, an operating system is a type of software without
which you cannot operate or run a computer. It acts as an intermediary or
translation system between computer hardware and application programs
installed on the computer. In other words, you cannot directly use computer
programs with computer hardware without having a medium to establish a
connection between them.
Besides this, it is also an intermediary between the computer user and
the computer hardware
as it provides a standard user interface that you see on your computer screen after you switch on
your computer. For example, the Windows and the Mac OS are also operating systems that
provide a graphical interface with icons and pictures to enable users to access multiple files and
applications simultaneously.
So, although the operating system is itself a program or software, it allows
users to run other programs or applications on the system. We can say that
is works behind the scenes to run your computer.
Major Functions of Operating System:
o Memory management: It manages both the primary and secondary
memory such as RAM, ROM, hard disk, pen drive, etc. It checks and
decides the allocations and deallocation of memory space to different
processes. When a user interacts with a system, the CPU is supposed
to read or write operations, in this case, OS decides the amount of
memory to be allocated for loading the program instructions and data
into RAM. After this program is terminated, the memory area is again
free and is ready to be allocated to other programs by the OS.
o Processor Management: It facilitates processor management, where
it decides the order for the processes to access the processor as well
as decides the processing time to be allocated for each process.
Besides this, it monitors the status of processes, frees the processor
when a process is executed then allocates it to a new process.
o Device/ hardware management: The operating system also
contains drivers to manage devices. A driver is a type of translation
software that allows the operating system to communicate with
devices, and there are different drivers for different devices as each
device speaks a different language.
o Run software applications: It offers the environment to run or use
software applications developed to perform specific tasks, for example,
Ms Word, Ms Excel, Photoshop, etc.
o Data management: It helps in data management by offering and
displaying directories for data management. You can view and
manipulate files, folders, e.g., you can move, copy, name, or rename,
delete a file or a folder.
o Evaluates the system's health: It gives us an idea about the
performance of the hardware of the system. For example, you can see
how busy the CPU is, how fast the data is retrieved from the hard disk,
etc.
o Provides user interface: It acts as an interface between the user and
the hardware. It can be a GUI where you can see and click elements on
the screen to perform various tasks. It enables you to communicate
with the computer even without knowing the computer's language.
o I/O management: It manages the input output devices and makes the
I/O process smooth and effective. For example, it receives the input
provided by the user through an input device and stores it in the main
memory. Then it directs the CPU to process this input and accordingly
provides the output through an output device such as a monitor.
o Security: It has a security module to protect the data or information
stored in the memories of the computer against malware and
unauthorized access. Thus, it not only manages your data but also
helps to protect it.
o Time Management: It helps CPU in time management. The Kernel OS
keeps checking the frequency of processes that requests CPU time.
When two or more processes that are equally important compete for
the CPU time, then the CPU time is sliced into segments and allocated
to these processes in a round-robin fashion to prevent a single process
from monopolizing the CPU.
o Deadlock Prevention: Sometimes a resource that is supposed to be
shared by two or more processes is held by one process due to which
the resource cannot continue. This situation is known as deadlock. The
OS does not let this situation arise by carefully distributing the
resources among the different processes.
o Interrupt Handling: OS also responds to interrupts, which are signals
generated by a program or a device to seek the attention of the CPU.
The OS checks the priority of the interrupt, and if it is more important
than the currently running process, it stops the execution of the
current process and preserves this state of CPU then executes the
requested process. Thereafter the CPU returns to the same state where
it was stopped.
Types of Operating System:
1) Batch Processing Operating System:
The interaction between a user and the computer does not occur in this
system. The user is required to prepare jobs on punch cards in the form of
batches and submit them to the computer operator. The computer operator
sorts the jobs or programs and keeps similar programs or jobs in the same
batch and run as a group to speed up processing. It is designed to execute
one job at a time. Jobs are processed on a first-come, first-serve basis, i.e., in
the order of their submission without any human intervention.
83.3K
OTD in Space - Sept. 7: STS-69 Endeavour Launches on NASA's 100th
Next
Stay
For example, the credit card bill generated by banks is an example of batch
processing. A separate bill is not generated for each credit card purchase,
rather a single bill that includes all purchases in a month is generated
through batch processing. The bill details are collected and held as a batch,
and then it is processed to generate the bill at the end of the billing cycle.
Similarly, in a payroll system, the salaries of employees of the company are
calculated and generated through the batch processing system at the end of
each month.
Advantages of Batch processing operating system:
o Repeated jobs can be completed easily without any human
intervention
o Hardware or system support is not required to input data in batch
systems
o It can work offline, so it causes less stress on the processor as it knows
which task to process next and how long the task will last.
o It can be shared among multiple users.
o You can set the timing of batch jobs so that when the computer is not
busy, it can start processing the batch jobs such as at night or any
other free time.
Disadvantages of batch processing operating systems:
o You need to train the computer operators for using the batch system.
o It is not easy to debug this system.
o If any error occurs in one job, the other jobs may have to wait for an
uncertain time.
2) Time Sharing Operating System:
As the name suggests, it enables multiple users located at different
terminals to use a computer system and to share the processor's time
simultaneously. In other words, each task gets time to get executed, and
thus all tasks are executed smoothly.
Each user gets the processor's time as they get while using a single system.
The duration of time allocated to a task is called quantum or time slice; when
this duration is over, OS starts the next task.
Advantages of time sharing operating system:
o It reduces CPU idle time and thus makes it more productive.
o Each process gets the chance to use the CPU.
o It allowed different applications run simultaneously.
Disadvantages of time sharing operating system:
o It requires a special operating system as it consumes more resources.
o Switching between tasks may hang up the system as it serves lots of
users and runs lots of applications at the same time, so it requires
hardware with high specifications.
o It is less reliable.
3) Distributed Operating System:
It uses or runs on multiple independent processors (CPUs) to serve multiple
users and multiple real-time applications. The communication between
processors is established through many communication lines such as
telephone lines and high-speed buses. The processors may differ from each
other in terms of size and function.
The availability of powerful microprocessor
and advanced communication technology have made it possible to design, develop, and use the
distributed operating system. Besides this, it is an extension of a network operating system that
supports a high level of communication and integration of machines on the network.
Advantages of distributed operating system:
o Its performance is higher than a single system as resources are being
shared.
o If one system stops working, malfunctions, or breaks down, other
nodes are not affected.
o Additional resources can be added easily.
o Shared access to resources like printer can be established.
o Delay in processing is reduced to a greater extent.
o Data sharing or exchange speed is high, owing to the use of electronic
mail.
Disadvantages of distributed operating system:
o Security issue may arise due to sharing of resources
o Few messages may be lost in the system
o Higher bandwidth is required in case of handling a large amount of
data
o Overloading issue may arise
o The performance may be low
o The languages which are used to set up a distributed system are not
well defined yet
o They are very costly, so they are not easily available.
4)Network Operating System:
As the name suggests, this OS
connects computers and devices to a local area network and manages network resources. The
software in a NOS enables the devices of the network to share resources and communicate with
each other. It runs on a server and allows shared access to printers, files, applications, files, and
other networking resources and functions over a LAN. Besides this, all users in the network are
aware of each other's underlying configuration and individual connections. Examples: Ms
Windows Server 2003 and 2008, Linux
, UNIX, Novell NetWare, Mac OS X, etc.
Advantages of network operating system:
o The servers are centralized that can be accessed remotely from distant
locations and different systems.
o It is easy to integrate advanced and recent technologies and hardware
in this system.
Disadvantages of network operating system:
o The servers used in the system may be expensive.
o The system depends on the central location and requires regular
monitoring and maintenance.
5) Real-Time Operating System:
It is developed for real-time applications where data should be processed in
a fixed, small duration of time. It is used in an environment where multiple
processes are supposed to be accepted and processed in a short time. RTOS
requires quick input and immediate response, e.g., in a petroleum refinery, if
the temperate gets too high and crosses the threshold value, there should be
an immediate response to this situation to avoid the explosion. Similarly, this
system is used to control scientific instruments, missile launch systems,
traffic lights control systems, air traffic control systems, etc.
This system is further divided into two types based on the time constraints:
Hard Real-Time Systems:
These are used for the applications where timing is critical or response time
is a major factor; even a delay of a fraction of the second can result in a
disaster. For example, airbags and automatic parachutes that open instantly
in case of an accident. Besides this, these systems lack virtual memory.
Soft Real-Time Systems:
These are used for application where timing or response time is less critical.
Here, the failure to meet the deadline may result in a degraded performance
instead of a disaster. For example, video surveillance (cctv), video player,
virtual reality, etc. Here, the deadlines are not critical for every task every
time.
Advantages of real-time operating system:
o The output is more and quick owing to the maximum utilization of
devices and system
o Task shifting is very quick, e.g., 3 microseconds, due to which it seems
that several tasks are executed simultaneously
o Gives more importance to the currently running applications than the
queued application
o It can be used in embedded systems like in transport and others.
o It is free of errors.
o Memory is allocated appropriately.
Disadvantages of real-time operating system:
o A fewer number of tasks can run simultaneously to avoid errors.
o It is not easy for a designer to write complex and difficult algorithms or
proficient programs required to get the desired output.
o Specific drivers and interrupt signals are required to respond to
interrupts quickly.
o It may be very expensive due to the involvement of the resources
required to work.
Generations of Operating System:
The first generation (1945 to 1955):
It was the time before the Second World War when the digital computer was
not developed, and there were calculating engines with mechanical relays at
this point in time. Later mechanical relays were replaced by vacuum tubes
as they were very slow. But, the performance issue was not resolved even
with vacuum tubes, besides these machines were too bulky and large as
there were made of tens of thousands of vacuum tubes.
Furthermore, each of the machines was designed, programmed, and
maintained by a single group of people. The programming languages and
operating systems were not known, and absolute machine language was
being used for programming.
These systems were designed for numerical calculations. The programmer
was required to sign up for a block of time and then insert his plug board into
the computer. In the 1950s, punch cards were introduced, which improved
the computer performance. It allowed programmers to write programs on
punch cards and read them into the system; the rest of the procedure was
the same.
The second generation (1955 to 1965):
This generation started with the introduction of transistors in the mid-1950s.
The use of transistors made the computers more reliable, and they began to
be sold to customers. These machines were called mainframes. Only the big
organization and government corporations could afford it. In this machine,
the programmer was required to write the program on a paper then punch it
on cards. The card would be taken to the input room and handed over to an
operator to get the output. The printer provides the output which was taken
to the output room. These steps made it a time-consuming task. So, the
batch system was adopted to address this issue.
In a batch system, the tasks were collected in a tray in the form of batches in
the input room and read onto a magnetic tape, which was taken to the
machine room, where it was mounted on a tape drive. Then using a special
program, the operator was to read the first task or job from the tape and run
it, and the output was generated onto a second tape. OS automatically read
the next job from the tape, and Jobs were completed one by one. After the
completion of the batch, the input and output tapes were taken off, and the
next batch was started. The printouts were taken from the output tape. It
was mainly used for engineering and scientific calculations. The first OS was
used in this generation in computers was called FMS (Fortran Monitor
System), and IBMSYS, and FORTRAN were used as a high-level language.
The third generation (1965 to 1979):
This generation began with the introduction of 360 family of computers
of IBM
in 1964. In this generation, transistors were replaced by silicon chips, and the operating system
was developed for multiprogramming, some of them even supported batch processing, time
sharing, real-time processing, at the same time.
The fourth generation operating system (1979 to Present):
This generation of OS started with the introduction of personal computers
and workstations. Chips that contain thousands of transistors were
introduced in this generation that made possible the development of
personal computers that supported the growth of networks and thus the
development of network operating systems and distributed operating
systems. DOS, Linux, and window operation systems were are few examples
of OS of this generation.