Operating System
Operating System
An operating system (OS) is a program that acts as an interface between the system
hardware and the user. Moreover, it handles all the interactions between
the software and the hardware. All the working of a computer system depends on
the OS at the base level. Further, it performs all the functions like
handling memory, processes, the interaction between hardware and software, etc.
Now, let us look at the functions of operating system.
Operating System
Objectives of OS
1
allows for the effective development, testing, and introduction of new features
without interfering with service.
⦁ Keeps a record of which part of primary memory is used by whom and how
much.
When more than one process runs on the system the OS decides how and when a
2
process will use the CPU. Hence, the name is also CPU Scheduling. The OS:
⦁ Round-Robin Scheduling
⦁ Proper utilization of CPU. Since the proper utilization of the CPU is necessary.
Therefore, the OS makes sure that the CPU should be as busy as possible.
⦁ Since every device should get a chance to use the processor. Hence, the OS
makes sure that the devices get fair processor time.
An operating system regulates device connection using drivers. The processes may
require devices for their use. This management is done by the OS. The OS:
⦁ Decides which process can use which device for how much time.
3
4. File Management
4
⦁ Security – For security, modern operating systems employ a firewall. A firewall
is a type of security system that monitors all computer activity and blocks it if it
detects a threat.
⦁ Job Accounting – As the operating system keeps track of all the functions of a
computer system. Hence, it makes a record of all the activities taking place on
the system. It has an account of all the information about the memory, resources,
errors, etc. Therefore, this information can be used as and when required.
⦁ Coordination between other software and users – The operating system (OS)
allows hardware components to be coordinated and directs and allocates
assemblers, interpreters, compilers, and other software to different users of
the computer system.
1. Batch OS
In this system, the OS does not forward the jobs/tasks directly to the CPU. It works
by grouping together similar types of jobs under one category. Further, we name
5
this group as a ‘batch’. Hence, the name batch OS.
2. Time-Shared OS
When more than one task takes place on the system it is called time-shared OS. As
multiple tasks can run at the system at a time as per requirement. Hence, they all
share the CPU time one by one. Therefore, we also name it multitasking. The time
that each task gets is called quantum.
A fixed interval of time is decided for each task. When the first task executes for
that period of time, the second task executes, and so on.
3. Distributed OS
In this system, there is more than one CPU present. The OS distributes the tasks
among all the processors. The processors do not share any memory or clock time.
OS handles all communication between them through various communication
lines.
4. Network OS
In these OS various systems are connected to a server. It allows the system to share
resources such as files, printers, applications, etc. Moreover, it gives the capability
to serve to manage these resources.
6
5. Real-Time OS (RTOS)
In these systems, the time interval for processing and responding to inputs is very
small. Therefore, due to this quality, these are used in real-time situations. For
example in missile systems, robots, etc.
In this, the time constraint is very short and strict. Even seconds of delay is not
acceptable.
⦁ Memory Management
⦁ Device Management
7
⦁ File Management
⦁ Security
⦁ Accounting
⦁ Simple Batch OS
⦁ Multitasking/Time-shared OS
⦁ Distributed OS
⦁ Network OS
⦁ Real-Time OS
Q4. What is CPU scheduling? Give examples.
A4. Every resource and application requires a processor. Therefore, when multiple
tasks are running on the system it is necessary to manage the CPU time and usage.
Hence, the OS keeps track of the CPU and allocates and deallocates the CPU to
devices and applications accordingly.
8
⦁ Round-Robin Scheduling