What is Operating System and Types of Operating System

An operating System (OS) is an intermediary between users and
computer hardware. It provides users an environment in which a user can
execute programs conveniently and efficiently.

In technical terms, It is a software which manages hardware. An
operating System controls the allocation of resources and services such
as memory, processors, devices and information.

Definition

An operating system is a program that acts as an interface between
the user and the computer hardware and controls the execution of all
kinds of programs.

Following are some of important functions of an operating System.

Memory Management

Processor Management

Device Management

File Management

Security

Control over system performance

Job accounting

Error detecting aids

Coordination between other software and users

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 access directly by
the CPU. So for a program to be executed, it must in the main memory.
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, OS decides which process will get memory when and how much.

Allocates the memory when the process requests it to do so.

De-allocates the memory when the process no longer needs it or has been terminated.

In multiprogramming environment, OS decides which process gets the
processor when and how much time. This function is called process
scheduling. Operating System does the following activities for processor
management.

Keeps tracks of processor and status of process. Program responsible for this task is known as traffic controller.

Allocates the processor(CPU) to a process.

De-allocates processor when processor is no longer required.

Device Management

OS manages device communication via their respective drivers.
Operating System does the following activities for device management.

Keeps tracks of all devices. Program responsible for this task is known as the I/O controller.

A file system is normally organized into directories for easy
navigation and usage. These directories may contain files and other
directions. 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.

Other Important Activities

Following are some of the important activities that Operating System does.

Security -- By means of password and similar other techniques, preventing unauthorized access to programs and data.

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.

In this type of system, there is no direct interaction between user and the computer.

The user has to submit a job (written on cards or tape) to a computer operator.

Then computer operator places a batch of several jobs on an input device.

Jobs are batched together by type of languages and requirement.

Then a special program, the monitor, manages the execution of each program in the batch.

The monitor is always in the main memory and available for execution.

Following are some disadvantages of this type of system :

Zero interaction between user and computer.

No mechanism to prioritize processes.

MULTIPROGRAMMING BATCH SYSTEMS

In this the operating system, picks and begins to execute one job from memory.

Once this job needs an I/O operation operating system switches to another job (CPU and OS always busy).

Jobs in the memory are always less than the number of jobs on disk(Job Pool).

If several jobs are ready to run at the same time, then system chooses which one to run (CPU Scheduling).

In Non-multiprogrammed system, there are moments when CPU sits idle and does not do any work.

In Multiprogramming system, CPU will never be idle and keeps on processing.

Time-Sharing Systems are very similar to Multiprogramming batch systems. In fact time sharing systems are an extension of multiprogramming systems.

In time sharing systems the prime focus is on minimizing the response
time, while in multiprogramming the prime focus is to maximize the CPU
usage.

MULTIPROCESSOR SYSTEMS

A multiprocessor system consists of several processors that share a
common physical memory. Multiprocessor system provides higher computing
power and speed. In multiprocessor system all processors operate under
single operating system. Multiplicity of the processors and how they do
act together are transparent to the others.

Following are some advantages of this type of system.

Enhanced performance

Execution of several tasks by different processors concurrently,
increases the system's throughput without speeding up the execution of a
single task.

If possible, system divides task into many subtasks and then these
subtasks can be executed in parallel in different processors. Thereby
speeding up the execution of single tasks.

DISTRIBUTED OPERATING SYSTEMS

The motivation behind developing distributed operating systems is the
availability of powerful and inexpensive microprocessors and advances
in communication technology.

These advancements in technology have made it possible to design and
develop distributed systems comprising of many computers that are inter
connected by communication networks. The main benefit of distributed
systems is its low price/performance ratio.

Following are some advantages of this type of system.

As there are multiple systems involved, user at one site can utilize
the resources of systems at other sites for resource-intensive tasks.

Fast processing.

Less load on the Host Machine.

REAL-TIME OPERATING SYSTEM

It is defined as an operating system known to give maximum time for
each of the critical operations that it performs, like OS calls and
interrupt handling.

The Real-Time Operating system which guarantees the maximum time for
critical operations and complete them on time are referred to as Hard Real-Time Operating Systems.

While the real-time operating systems that can only guarantee a
maximum of the time, i.e. the critical task will get priority over other
tasks, but no assurity of completeing it in a defined time. These
systems are referred to as Soft Real-Time Operating Systems.

Network operating System

Network Operating System runs on a server and and provides server the
capability to manage data, users, groups, security, applications, and
other networking functions. The primary purpose of the network operating
system is to allow shared file and printer access among multiple
computers in a network, typically a local area network (LAN), a private
network or to other networks. Examples of network operating systems are
Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX,
Linux, Mac OS X, Novell NetWare, and BSD.

The advantages of network operating systems are following.

Centralized servers are highly stable.

Security is server managed.

Upgrades to new technologies and hardwares can be easily integrated into the system.

Remote access to servers is possible from different locations and types of systems.