0% found this document useful (0 votes)
76 views14 pages

Introduction of Operating System (Unit 1)

This document provides an overview of operating systems, including definitions, functions, and types. It defines an operating system as an interface between the user and computer hardware that manages memory, processors, devices, files and more. Popular operating systems mentioned include Linux, Windows, VMS, OS/400 and AIX. Memory, processor, device and file management functions are described. Types of operating systems covered are simple batch systems, multiprogramming, multitasking, multiprocessor, distributed and clustered systems.

Uploaded by

Anuvab Official
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
76 views14 pages

Introduction of Operating System (Unit 1)

This document provides an overview of operating systems, including definitions, functions, and types. It defines an operating system as an interface between the user and computer hardware that manages memory, processors, devices, files and more. Popular operating systems mentioned include Linux, Windows, VMS, OS/400 and AIX. Memory, processor, device and file management functions are described. Types of operating systems covered are simple batch systems, multiprogramming, multitasking, multiprocessor, distributed and clustered systems.

Uploaded by

Anuvab Official
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 14

Introduction of Operating System (Unit 1)

An Operating System (OS) is an interface between a computer user and computer


hardware. An operating system is a software which performs all the basic tasks like file
management, memory management, process management, handling input and output,
and controlling peripheral devices such as disk drives and printers.
Some popular Operating Systems include Linux Operating System, Windows
Operating System, VMS, OS/400, AIX, z/OS, etc.

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 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.
• De-allocates the memory when a process no longer needs it or has been
terminated.

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.

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.
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.

Other Important Activities


Following are some of the important activities that an Operating System performs −
• Security − By means of password and similar other techniques, it prevents
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.
• 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.

Types of Operating Systems


Following are some of the most widely used types of Operating system.

1. Simple Batch System


2. Multiprogramming Operating System
3. Multitasking/Time Sharing Operating System
4. Multiprocessor System
5. Distributed Operating System
6. Clustered System
7. Realtime Operating System
8. Embedded Operating System

Simple Batch Systems


• 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.

Advantages of Simple Batch Systems

1. No interaction between user and computer.


2. No mechanism to priorities the processes.
Multiprogramming Batch Systems
• In this the operating system picks up and begins to execute one of the jobs 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 the system chooses which one to

run through the process of 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.
Time-sharing /Multitasking operating systems
Time-sharing is a technique which enables many people, located at various terminals,
to use a particular computer system at the same time. Time-sharing or multitasking is a
logical extension of multiprogramming. Processor's time which is shared among
multiple users simultaneously is termed as time-sharing.
The main difference between Multiprogrammed Batch Systems and Time-Sharing
Systems is that in case of Multiprogrammed batch systems, the objective is to
maximize processor use, whereas in Time-Sharing Systems, the objective is to
minimize response time.
Multiple jobs are executed by the CPU by switching between them, but the switches
occur so frequently. Thus, the user can receive an immediate response. For example,
in a transaction processing, the processor executes each user program in a short burst
or quantum of computation. That is, if n users are present, then each user can get a
time quantum. When the user submits the command, the response time is in few
seconds at most.
The operating system uses CPU scheduling and multiprogramming to provide each
user with a small portion of a time. Computer systems that were designed primarily as
batch systems have been modified to time-sharing systems.
Advantages of Timesharing operating systems are as follows −

• Provides the advantage of quick response.


• Avoids duplication of software.
• Reduces CPU idle time.
Disadvantages of Time-sharing operating systems are as follows −

• Problem of reliability.
• Question of security and integrity of user programs and data.
• Problem of data communication.

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.
Advantages of Multiprocessor Systems

1. Enhanced performance
2. Execution of several tasks by different processors concurrently, increases the system's

throughput without speeding up the execution of a single task.

3. 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 System


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.

Advantages Distributed Operating System

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

2. Fast processing.

3. Less load on the Host Machine.

Clustered Systems
• Like parallel systems, clustered systems gather together multiple CPUs to
accomplish computational work.
• Clustered systems differ from parallel systems, however, in that they are
composed of two or more individual systems coupled together.
• The definition of the term clustered is not concrete; the general accepted
definition is that clustered computers share storage and are closely linked via
LAN networking.
• Clustering is usually performed to provide high availability.
• A layer of cluster software runs on the cluster nodes. Each node can monitor one
or more of the others. If the monitored machine fails, the monitoring machine can
take ownership of its storage, and restart the application(s) that were running on
the failed machine. The failed machine can remain down, but the users and
clients of the application would only see a brief interruption of service.

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.

Embedded Operating System


As the name suggests Embedded Operating System is an Embedded System’s
Operating System. It has limited features. It is usually designed for some
particular operations to control an electronic device. For instance, all mobile
phones essentially consist of an operating system that always boots up when the
mobile phone is in running condition. It controls all the features and basic
interface of the mobile phone. There are some other programs that can be
loaded onto the mobile phones. Mostly, JAVA Apps run on the top. Embedded
operating systems runs on embedded processors.

Difference between Multiprogramming and Multi-tasking


SR.NO MULTIPROGRAMMING MULTI-TASKING

1. Both of these concepts are for single Both of these concepts are for single CPU.
SR.NO MULTIPROGRAMMING MULTI-TASKING

CPU.

Concept of Context Switching is Concept of Context Switching and Time

2. used. Sharing is used.

The processor is typically used in time

In multiprogrammed system, the sharing mode. Switching happens when either

operating system simply switches allowed time expires or where there other

to, and executes, another job when reason for current process needs to wait

3. current job needs to wait. (example process needs to do IO).

Multi-programming increases CPU In multi-tasking also increases CPU

4. utilization by organising jobs . utilization, it also increases responsiveness.

The idea is to further extend the CPU

The idea is to reduce the CPU idle Utilization concept by increasing

5. time for as long as possible. responsiveness Time Sharing.

System Call in OS

A system call is a mechanism that provides the interface between a process


and the operating system. It is a programmatic method in which a computer
program requests a service from the kernel of the OS.
System call offers the services of the operating system to the user programs
via API (Application Programming Interface). System calls are the only entry
points for the kernel system.
How System Call Works?
Here are steps for System Call:

Step 1) The processes executed in the user mode till the time a system call
interrupts it.

Step 2) After that, the system call is executed in the kernel-mode on a priority
basis.

Step 3) Once system call execution is over, control returns to the user mode.,

Step 4) The execution of user processes resumed in Kernel mode.

Why do you need System Calls in OS?


Following are situations which need system calls in OS:

• Reading and writing from files demand system calls.


• If a file system wants to create or delete files, system calls are required.
• System calls are used for the creation and management of new
processes.
• Network connections need system calls for sending and receiving
packets.
• Access to hardware devices like scanner, printer, need a system call.
Types of System calls
Here are the five types of system calls used in OS:

• Process Control
• File Management
• Device Management
• Information Maintenance
• Communications

Categories Windows Unix
CreateProcess() ExitProcess()
Process control fork() exit() wait()
WaitForSingleObject()
Device
SetConsoleMode() ReadConsole() WriteConsole() loctl() read() write()
manipulation
Open() Read()
File manipulation CreateFile() ReadFile() WriteFile() CloseHandle()
write() close!)
Information getpid() alarm()
GetCurrentProcessID() SetTimer() Sleep()
maintanence sleep()
Pipe() shm_open()
Communication CreatePipe() CreateFileMapping() MapViewOfFile()
mmap()
SetFileSecurity() InitlializeSecurityDescriptor() Chmod() Umask()
Protection
SetSecurityDescriptorGroup () Chown()
Operating System Generations
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


Plugboards
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 plugboards, 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.

You might also like