Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Operating system

Introduction

 Operating system is a system software that 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.

 The operating system has two objectives such as:

1. Firstly, an operating system controls the computer’s hardware.

2. The second objective is to provide an interactive interface to the user


and interpret commands so that it can communicate with the hardware.

 The operating system is very important part of almost every computer


system.

What operating systems do?


 A computer system can be divided roughly into four components: the
hardware/ the operating system, the application programs and the users.
 The hardware, the CPU, the memory and the input/output (I/O) devices
provides the basic computing resources for the system. The application
program such as word processors, spreadsheets, compilers, and Web
browsers define the ways in which these resources are used to solve users'
computing problems.
 The operating system controls the hardware and coordinates its use among
the various application programs for the various users.

TYPES OF OPERATING SYSTEM

An Operating System performs all the basic tasks like managing file, process, and
memory. Thus operating system acts as manager of all the resources, i.e. resource
manager. Thus operating system becomes an interface between user and machine.

Types of Operating Systems: Some of the widely used operating systems are as
follows-

1. Batch processing OS

2. Distributed OS

3. Time sharing OS

4. Multi tasking OS

5. Real-time OS

6. Network OS

1. Batch Processing Operating System -

This type of operating system does not interact with the computer directly. There
is an operator which takes similar jobs having same requirement and group them
into batches. It is the responsibility of operator to sort the jobs with similar
needs.
Eg- payroll statement, bank statement
Advantages:
 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:
 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.

2.Distributed OS-
 In this operating system various computers are connected through a
single communication channel.
 These independent computers have their memory unit and CPU and are
known as loosely coupled systems.
 The major benefits of such type of operating system are that a user can
access files that are not present on his system but another connected
system.
 Remote access is available to the systems connected to this work.
Eg- LOCUS
Advantages
 Failure of one system will not affect the other systems because all
the computers are independent of each other.
 The load on the host system is reduced.
 As the workload and resources are shared therefore the
calculations are performed at higher speed.
 Data exchange speed is increased with the help of electronic mail.
Disadvantages
 The setup cost is high.
 Software used for such system is highly complex.
 Failure of the main network will lead to failure of the main system.

3.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.
Eg- UNIX
Advantages of Time-Sharing OS:
 Each task gets equal time for execution.
 Fewer chances of duplication of software.
 CPU idle time can be reduced
Disadvantages of Time-Sharing OS:
 Processes with higher priority cannot be executed first as equal priority is
given to each processor or task.
 Sometimes there is a data communication problem.
4. Network Operating System:
 Network operating systems are the systems that run on a server and
manage all the networking functions.
 They allow sharing of various files, applications, printers, security and
other networking functions over a small network of computers like LAN
or any other private network.
 Network operating system are also known as tightly coupled system
because all the users are aware of the configurations of every other users
within the network.
Eg- Microsoft windows server 2008, LINUX
Advantages:
 New technologies and hardware can easily upgrade the system.
 Security of the system is managed over server.
 Server can be accessed remotely from different locations and systems.
Disadvantages:
 Server costs are high.
 Regular updates and maintenance are required.
 Users are dependent on the central location for the maximum number of
operations.

5. Real time OS:


 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. In
this system an important task is prioritized over less important task and
this priority remains active until the completion of the task.
 A time limit is always set for a specific job enabling a short time delays
for future tasks, which is acceptable, for example like, virtual reality.
Eg- medical imaging system, robots, scientific experiment etc

Advantages:
 It provides more output from all the resources as there is maximum
utilization of systems.
 It provides the best memory management allocation.
 These systems are always error free.
 Shifting one task to another takes very little time.
Disadvantages:
 System resources are extremely expensive.
 The algorithms used are very complex.
 Only limited task can run at a single time.

6. Mobile OS:
A mobile operating system is for smart phones, tablets. It is a platform on
which other application can run on mobile device.
Eg- android, iOS, windows mobile OS
Advantages:
 It provides an ease to user.
Disadvantages:
 Some of the mobile operating systems give poor battery quality to users.
 Some are not user friendly.
Functions of operating system:

1. Memory Management: It is the management of the main or primary


memory. Whatever program is executed, it has to be present in the main
memory. Therefore, there can be more than one program present at a time.
Hence, it is required to manage the memory.
Activities:
 Allocates and deallocates the memory.
 Keeps a record of which part of memory is used by whom and how
much.
 Distributes the memory while multiprocessing.
2. Process Management: When more than one process runs on the system the
OS decides how and when a process will use the CPU. Hence, the name is
also CPU Scheduling. Some algorithm used for CPU scheduling is; First
Come First Serve (FCFS), Shortest Job First (SJF), Priority and Round Robin.
Activities:
 Allocates and deallocates processor to the processes.
 Keeps record of CPU status.
3. Device Management: An Operating System manages device
communication via their respective drivers. The processes may require
devices for their use. This management is done by the OS.
Activities:

 Allocates and deallocates devices to different processes.

 Keep records of the devices. Program responsible for this task is


known as the I/O controller.
 Decides which process can use which device for how much time.
4. File Management: A file system is normally organized into directories for
easy navigation and usage. These directories may contain files and other
directions.
Activities:
 Keeps track of information, location, uses, status etc. The collective
facilities are often known as file system.
 Decides who gets the resources.
 Allocates and deallocates the resources.
5. Security Management: The Operating system is responsible for security
means the operating system prevents the data and information from
unauthorized access and threats. A user id and password decide the
authenticity of the user.

Operating System Services:


 Operating system provides an environment for the execution of program.
 It provides certain services to program and to the user of those programs.

 There are two set of operating system services; one set is helpful for the user
and another set is helpful for system.
Set of services that are helpful to the user:
i. User Interface: almost all operating system have user interface (UI).
There are three types of user interface;
a) Command Line Interface (CLI): which uses text commands
and it is a method or program to allow entering and editing the
commands.
b) Batch Interface (BI): commands and directives are used to
manage those commands that are entered into files and those
files get executed.
c) Graphical User Interface: which is a window system with a
pointing device (like mouse or trackball) to point to the I/O,
choose from menus driven interface and to make choices
viewing from a number of lists and a keyboard to entry the
texts.
ii. Program Execution: The operating system must have the capability
to load a program into memory and execute that program.
Furthermore, the program must be able to end its execution, either
normally or abnormally (indicating error).
iii. I/O operation: A running program may require I/O, which may
involve a file or an I/O device. For specific devices, special functions
may be desired (such as recording to a CD or DVD drive). For
efficiency and protection, users usually cannot control I/O devices
directly. Therefore, the operating system must provide a means to do
I/O.
iv. File system manipulation: Programs need has to be read and then
write them as files and directories. File handling portion of operating
system also allows users to create and delete files by specific name
along with extension, search for a given file and / or list file
information. Some programs comprise of permissions management
for allowing or denying access to files or directories based on file
ownership.
v. Communication: Process needs to swap over information with other
process. Processes executing on same computer system or on
different computer systems can communicate using operating system
support. Communication between two processes can be done using
shared memory or via message passing.
vi. Error detection: Errors may occur in the CPU and memory hardware
(such as a memory error or a power failure), in I/0 devices (such as a
parity error on tape, a connection failure on a network, or lack of
paper in the printer), and in the user program (such as an arithmetic
overflow, an attempt to access an illegal memory location). For each
type of error the operating system should take the appropriate action
to ensure correct and consistent computing.
Another set of operating system service is helpful for system:
vii. Resource Allocation: When there are multiple users or multiple jobs
running at the same time, resources must be allocated to each of them.
Many different types of resources are managed by the operating
system. Some (such as CPU cycles, main memory, and file storage)
may have special allocation code, whereas others (such as I/O
devices) may have much more general request and release code. For
instance, in determining how best to use the CPU, operating systems
have CPU-scheduling routines that take into account the speed of the
CPU, the jobs that must be executed, the number of registers
available, and other factors. There may also be routines to allocate
printers, modems, USB storage drives, and other peripheral devices.
viii. Accounting: we want to keep track of which users use how much and
what kinds of computer resources. This record keeping may be used
for accounting or simply for accumulating usage statistics. Usage
statistics may be a valuable tool for researchers who wish to
reconfigure the system to improve computing services.
ix. Protection and security: Protection includes in ensuring all access to
system resources in a controlled manner. For making a system secure,
the user needs to authenticate him or her to the system before using
(usually via login ID and password).

System Programs:
 System programs, also known as system utilities, provide a convenient
environment for program development in execution.
 Some of them are simply user interfaces to system calls; others are
considerably more complex. They can be divided into these categories:
i. File Management: These programs create, delete, copy, rename,
print, list and generally manipulate files and directories.
ii. Status information: Information like date, time amount of available
memory, or disk space is asked by some users. Others are providing
detailed performance, logging, and debugging information which is
more complex. All this information is formatted and displayed on
output devices or printed. Terminal or other output devices or files or
a window of GUI is used for showing the output of programs.
iii. File modification: For modifying the contents of files we use this.
For Files stored on disks or other storage devices, we used different
types of editors. For searching contents of files or perform
transformations of files we use special commands.
iv. Programming language support: Compilers, assemblers, debuggers,
and interpreters for common programming languages (such as C,
C++, Java, Visual Basic) are often provided to the user with the
operating system.
v. Program loading and execution: When the program is ready after
Assembling and compilation, it must be loaded into memory for
execution. A loader is part of an operating system that is responsible
for loading programs and libraries. It is one of the essential stages for
starting a program. Loaders, relocatable loaders, linkage editors, and
Overlay loaders are provided by the system.
vi. Communications: These programs provide the mechanism for
creating virtual connections among processes, users, and computer
systems. They allow users to send messages to one another's screens,
to browse Web pages, to send electronic-mail messages, to log in
remotely, or to transfer files from one machine to another.

In addition to systems programs, most operating systems are supplied with


programs that are useful in solving common problems or performing common
operations. Such application programs include web browsers, word processors
and text formatters, spreadsheets, database systems, compilers and games.

You might also like