Overview of OS
Overview of OS
1
Components of Computer System:
It Contains- Central Processing Unit, Input devices and Output devices. Input
devices provide data input to the processor, which processes data and generates
useful information that’s displayed to the user through output devices. This is stored
in the computer's memory.
1. Memory Management
Memory management refers to management of Primary Memory or Main Memory.
Main memory is a large array of words or bytes where each word or byte has its own
address.
Main memory provides a fast storage that can be accessed directly by the CPU. For a
program to be executed, it must in the main memory. An Operating System does the
following activities for memory management −
● Keeps tracks of primary memory, i.e., what part of it are in use by whom, what
part are not in use.
● In multiprogramming, the OS decides which process will get memory when
and how much.
● Allocates the memory when a process requests it to do so.
2
● De-allocates the memory when a process no longer needs it or has been
terminated.
1. Processor Management
In multiprogramming environment, the OS decides which process gets the
processor when and for how much time. This function is called process scheduling.
An Operating System does the following activities for processor management −
● Keeps tracks of processor and status of process. The program responsible for
this task is known as traffic controller.
● Allocates the processor (CPU) to a process.
● De-allocates processor when a process is no longer required.
2. Device Management
An Operating System manages device communication via their respective drivers. It
does the following activities for 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.
3. File Management
A file system is normally organized into directories for easy navigation and
usage. These directories may contain files and other directions.
An Operating System does the following activities for 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.
3
● 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 softwares and users − Coordination and
assignment of compilers, interpreters, assemblers and other software to the
various users of the computer systems.
Batch processing:
4
Advantages
● Batch processing takes much of the work of the operator to the computer.
● Increased performance as a new job get started as soon as the previous job is
finished, without any manual intervention.
Disadvantages
● Difficult to debug program.
● A job could enter an infinite loop.
● Due to lack of protection scheme, one batch job can affect pending jobs.
5
Distributed operating System:
Distributed systems use multiple central processors to serve multiple
real-time applications and multiple users. Data processing jobs are distributed
among the processors accordingly.
The processors communicate with one another through various
communication lines (such as high-speed buses or telephone lines). These are
referred to as loosely coupled systems or distributed systems. Processors in a
distributed system may vary in size and function. These processors are referred to as
sites, nodes, computers, and so on.
The advantages of distributed systems are as follows −
● With resource sharing facility, a user at one site may be able to use the
resources available at another.
● Speedup the exchange of data with one another via electronic mail.
● If one site fails in a distributed system, the remaining sites can potentially
continue operating.
● Better service to the customers.
● Reduction of the load on the host computer.
● Reduction of delays in data processing.
6
Clustered systems:
Clustered systems are similar to parallel systems as they both have multiple
CPUs. However a major difference is that clustered systems are created by two or
more individual computer systems merged together. Basically, they have
independent computer systems with a common storage and the systems work
together.
A diagram to better illustrate this is −
The clustered systems are a combination of hardware clusters and software clusters.
The hardware clusters help in sharing of high performance disks between the
systems. The software clusters makes all the systems work together .
Each node in the clustered systems contains the cluster software. This software
monitors the cluster system and makes sure it is working as required. If any one of
the nodes in the clustered system fail, then the rest of the nodes take control of its
storage and resources and try to restart.
Types of Clustered Systems
There are primarily two types of clustered systems i.e. asymmetric clustering system
and symmetric clustering system. Details about these are given as follows −
Asymmetric Clustering System
In this system, one of the nodes in the clustered system is in hot standby mode and
all the others run the required applications. The hot standby mode is a failsafe in
which a hot standby node is part of the system . The hot standby node continuously
monitors the server and if it fails, the hot standby node takes its place.
Symmetric Clustering System
In symmetric clustering system two or more nodes all run applications as well as
monitor each other. This is more efficient than asymmetric system as it uses all the
hardware and doesn't keep a node merely as a hot standby.
7
Attributes of Clustered Systems
There are many different purposes that a clustered system can be used for. Some of
these can be scientific calculations, web support etc. The clustering systems that
embody some major attributes are −
● Load Balancing Clusters
In this type of clusters, the nodes in the system share the workload to provide
a better performance. For example: A web based cluster may assign different
web queries to different nodes so that the system performance is optimized.
Some clustered systems use a round robin mechanism to assign requests to
different nodes in the system.
● High Availability Clusters
These clusters improve the availability of the clustered system. They have
extra nodes which are only used if some of the system components fail. So,
high availability clusters remove single points of failure i.e. nodes whose
failure leads to the failure of the system. These types of clusters are also
known as failover clusters or HA clusters.
Benefits of Clustered Systems
The difference benefits of clustered systems are as follows −
● Performance
Clustered systems result in high performance as they contain two or more
individual computer systems merged together. These work as a parallel unit
and result in much better performance for the system.
● Fault Tolerance
Clustered systems are quite fault tolerant and the loss of one node does not
result in the loss of the system. They may even contain one or more nodes in
hot standby mode which allows them to take the place of failed nodes.
● Scalability
Clustered systems are quite scalable as it is easy to add a new node to the
system. There is no need to take the entire cluster down to add a new node.
Multitasking:
Multitasking is when multiple jobs are executed by the CPU simultaneously by
switching between them. Switches occur so frequently that the users may interact
with each program while it is running. An OS does the following activities related to
multitasking −
● The user gives instructions to the operating system or to a program directly,
and receives an immediate response.
● The OS handles multitasking in the way that it can handle multiple
operations/executes multiple programs at a time.
● Multitasking Operating Systems are also known as Time-sharing systems.
8
● These Operating Systems were developed to provide interactive use of a
computer system at a reasonable cost.
● A time-shared operating system uses the concept of CPU scheduling and
multiprogramming to provide each user with a small portion of a time-shared
CPU.
● Each user has at least one separate program in memory.
● A program that is loaded into memory and is executing is commonly referred
to as a process.
● When a process executes, it typically executes for only a very short time before
it either finishes or needs to perform I/O.
● Since interactive I/O typically runs at slower speeds, it may take a long time to
complete. During this time, a CPU can be utilized by another process.
● The operating system allows the users to share the computer simultaneously.
Since each action or command in a time-shared system tends to be short, only
a little CPU time is needed for each user.
● As the system switches CPU rapidly from one user/program to the next, each
user is given the impression that he/she has his/her own CPU, whereas
actually one CPU is being shared among many users.
9
An OS does the following activities related to multiprogramming.
● The operating system keeps several jobs in memory at a time.
● This set of jobs is a subset of the jobs kept in the job pool.
● The operating system picks and begins to execute one of the jobs in the
memory.
● Multiprogramming operating systems monitor the state of all active programs
and system resources using memory management programs to ensures that
the CPU is never idle, unless there are no jobs to process.
Advantages
● High and efficient CPU utilization.
● User feels that many programs are allotted CPU almost simultaneously.
Disadvantages
● CPU scheduling is required.
● To accommodate many jobs in memory, memory management is required.
10
Multiprocessor Systems
Most computer systems are single processor systems i.e they only have one
processor. However, multiprocessor or parallel systems are increasing in importance
nowadays. These systems have multiple processors working in parallel that share the
computer clock, memory, bus, peripheral devices etc. An image demonstrating the
multiprocessor architecture is −
Types of Multiprocessors
There are mainly two types of multiprocessors i.e. symmetric and asymmetric
multiprocessors. Details about them are as follows −
Symmetric Multiprocessors
In these types of systems, each processor contains a similar copy of the operating
system and they all communicate with each other. All the processors are in a peer to
peer relationship i.e. no master - slave relationship exists between them.
Asymmetric Multiprocessors
In asymmetric systems, each processor is given a predefined task. There is a master
processor that gives instruction to all the other processors. Asymmetric
multiprocessor system contains a master slave relationship.
11
More reliable Systems
In a multiprocessor system, even if one processor fails, the system will not halt. This
ability to continue working despite hardware failure is known as graceful
degradation. For example: If there are 5 processors in a multiprocessor system and
one of them fails, then also 4 processors are still working. So the system only
becomes slower and does not ground to a halt.
Enhanced Throughput
If multiple processors are working in tandem, then the throughput of the system
increases i.e. number of processes getting executed per unit of time increase. If there
are N processors then the throughput increases by an amount just under N.
Multiprocessor systems are cheaper than single processor systems in the long run
because they share the data storage, peripheral devices, power supplies etc. If there
are multiple processes that share data, it is better to schedule them on
multiprocessor systems with shared data than have different computer systems with
multiple copies of the data.
Increased Expense
Even though multiprocessor systems are cheaper in the long run than using multiple
computer systems, still they are quite expensive. It is much cheaper to buy a simple
single processor system than a multiprocessor system.
All the processors in the multiprocessor system share the memory. So a much larger
pool of memory is required as compared to single processor systems.
12
Mobile Operating System
A mobile operating system is an operating system that helps to run other application
software on mobile devices. It is the same kind of software as the famous computer
operating systems like Linux and Windows, but now they are light and simple to
some extent.
1. Android OS: The Android operating system is the most popular operating system
today. It is a mobile OS based on the Linux Kernel and open-source software. The
android operating system was developed by Google. The first Android device was
launched in 2008.
2. Bada (Samsung Electronics): Bada is a Samsung mobile operating system that was
launched in 2010. The Samsung wave was the first mobile to use the bada operating
system. The bada operating system offers many mobile features, such as 3-D
graphics, application installation, and multipoint-touch.
4. iPhone OS / iOS: The iOS was developed by the Apple inc for the use on its device.
The iOS operating system is the most popular operating system today. It is a very
secure operating system. The iOS operating system is not available for any other
mobiles.
5. Symbian OS: Symbian operating system is a mobile operating system that provides
a high-level of integration with communication. The Symbian operating system is
based on the java language. It combines middleware of wireless communications and
personal information management (PIM) functionality. The Symbian operating
system was developed by Symbian Ltd in 1998 for the use of mobile phones. Nokia
was the first company to release Symbian OS on its mobile phone at that time.
6. Windows Mobile OS: The window mobile OS is a mobile operating system that was
developed by Microsoft. It was designed for the pocket PCs and smart mobiles.
7. Harmony OS: The harmony operating system is the latest mobile operating system
that was developed by Huawei for the use of its devices. It is designed primarily for
IoT devices.
13
8. Palm OS: The palm operating system is a mobile operating system that was
developed by Palm Ltd for use on personal digital assistants (PADs). It was
introduced in 1996. Palm OS is also known as the Garnet OS.
9. WebOS (Palm/HP): The WebOS is a mobile operating system that was developed
by Palm. It based on the Linux Kernel. The HP uses this operating system in its
mobile and touchpads.
14
Open Source operating systems
Open Source operating systems are released under a license where the copyright
holder allows others to study, change as well as distribute the software to other
people. This can be done for any reason. The different open source operating system
available in the market are −
Cosmos
This is an open source operating system written mostly in programming language
C#. Its full form is C# Open Source Managed Operating System. Till 2016, Cosmos
did not intend to be a fully fledged operating system but a system that allowed other
developers to easily build their own operating systems. It also hide the inner
workings of the hardware from the developers thus providing data abstraction.
FreeDOS
This was a free operating system developed for systems compatible with IBM PC
computers. FreeDOS provides a complete environment to run legacy software and
other embedded systems. It can be booted from a floppy disk or USB flash drive as
required. FreeDos is licensed under the GNU General Public license and contains
free and open source software. So there is no license fees required for its
distribution and changes to the system are permitted.
Genode
Genode is free as well as open source. It contains a microkernel layer and different
user components. It is one of the few open source operating systems not derived
from a licenced operating system such as Unix. Genode can be used as an operating
system for computers, tablets etc. as required. It is also used as a base for
virtualisation, interprocess communication, software development etc. as it has a
small code system.
Ghost OS
This is a free, open source operating system developed for personal computers. It
started as a research project and developed to contain various advanced features like
graphical user interface, C library etc. The Ghost operating system features
multiprocessing and multitasking and is based on the Ghost Kernel. Most of the
programming in Ghost OS is done in C++.
15
16