Unit 4 Operating System
Unit 4 Operating System
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.
Memory Management
Processor Management
Device Management
File Management
Security
Control over system performance
Job accounting
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.
De-allocates the memory when the process no longer needs it or has been
terminated.
Processor Management
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 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.
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. Operating System does
the following activities for file management.
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.
OS Services:
An Operating System provides services to both the users and to the programs.
Program execution
I/O operations
Communication
Error Detection
Resource Allocation
Protection
Program execution
Operating system handles many kinds of activities from user programs to system
programs like printer spooler, name servers, file server etc. Each of these activities
is encapsulated as a process.
I/O Operation
I/O subsystem comprised of I/O devices and their corresponding driver software.
Drivers hides the peculiarities of specific hardware devices from the user as the
device driver knows the peculiarities of the specific device.
Operating System manages the communication between user and device drivers.
Following are the major activities of an operating system with respect to I/O
Operation.
I/O operation means read or write operation with any file or any specific I/O
device.
Operating system provides the access to the required I/O device when
required.
A file system is normally organized into directories for easy navigation and usage.
These directories may contain files and other directions. Following are the major
activities of an operating system with respect to file management.
Communication
In case of distributed systems which are a collection of processors that do not
share memory, peripheral devices, or a clock, operating system manages
communications between processes. Multiple processes with one another through
communication lines in the network.
OS handles routing and connection strategies, and the problems of contention and
security. Following are the major activities of an operating system with respect to
communication.
The both processes can be on the one computer or on different computer but
are connected through computer network.
Error handling
Error can occur anytime and anywhere. Error may occur in CPU, in I/O devices or
in the memory hardware. Following are the major activities of an operating
system with respect to error handling.
Resource Management
In case of multi-user or multi-tasking environment, resources such as main
memory, CPU cycles and files storage are to be allocated to each user or job.
Following are the major activities of an operating system with respect to resource
management.
Protection
Considering a computer systems having multiple users the concurrent execution
of multiple processes, then the various processes must be protected from each
another's activities.
OS ensures that external I/O devices are protected from invalid access
attempts.
CPU is often idle, because the speeds of the mechanical I/O devices is
slower than CPU.
Multiple jobs are executed by the CPU by switching between them, but the
switches occur so frequently. Thus, the user can receives an immediate response.
For example, in a transaction processing, processor execute each user program in
a short burst or quantum of computation. That is if n users are present, each user
can get time quantum. When the user submits the command, the response time is
in few seconds at most.
Problem of reliability.
With resource sharing facility 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.
Real-time systems are used when there are rigid time requirements on the
operation of a processor or the flow of data and real-time systems can be used as a
control device in a dedicated application. Real-time operating system has well-
defined, fixed time constraints otherwise system will fail.For example Scientific
experiments, medical imaging systems, industrial control systems, weapon
systems, robots, and home-applicance controllers, Air traffic control system etc.