Explain the Functions of Operating System
a) File Management
File management is one of the most visible services of an operating system.
Computers can store information in several different physical forms: magnetic tape, disk,
and drum are the most common forms. Each of these devices has it own characteristics
and physical organisation. For convenient use of the computer system, the operating
system provides a uniform logical view of information storage. The operating system
abstracts from the physical properties of its storage devices to define a logical storage
unit, the file. Files are mapped, by the operating system, onto physical devices. A file is a
collection of related information defined by its creator. Commonly, files represent programs
(both source and object forms) and data. Data files may be numeric, alphabetic or
alphanumeric. Files may be free-form, such as text files, or may be rigidly formatted. In
general a files is a sequence of bits, bytes, lines or records whose meaning is defined by
its creator and user. It is a very general concept. The operating system implements the
abstract concept of the file by managing mass storage device, such as types and disks.
Also files are normally organised into directories to ease their use. Finally, when multiple
users have access to files, it may be desirable to control by whom and in what ways files
may be accessed. The operating system is responsible for the following activities in
connection to the file management:
The creation and deletion of files.
The creation and deletion of directory.
The support of primitives for manipulating files and directories.
The mapping of files onto disk storage.
Backup of files on stable (non volatile) storage.
Protection and security of the files.
b) I/O Management
One of the purposes of an operating system is to hide the peculiarities or specific
hardware devices from the user. For example, in UNIX, the peculiarities of I/O devices are
hidden from the bulk of the operating system itself by the I/O system. The operating
system is responsible for the following activities in connection to I/O management:
A buffer caching system
To activate a general device driver code
To run the driver software for specific hardware devices as and when required
c) Process Management:
The CPU executes a large number of programs. While its main concern is the execution of
user programs, the CPU is also needed for other system activities. These
Activities are called processes. A process is a program in execution. Typically, a
batch job is a process. A time-shared user program is a process. A system task, such as
spooling, is also a process. For now, a process may be considered as a job or a timeshared
program, but the concept is actually more general. The operating system is responsible for
the following activities in connection with processes management:
The creation and deletion of both user and system processes
The suspension and resumption of processes.
The provision of mechanisms for process synchronization
The provision of mechanisms for deadlock handling.
d) Security Management:
The various processes in an operating system must be protected from each other’s
activities. For that purpose, various mechanisms which can be used to ensure that the
files, memory segment, CPU and other resources can be operated on only by those
processes that have gained proper authorization from the operating system.
For example, memory addressing hardware ensures that a process can only execute
within its own address space. The timer ensures that no process can gain control of the
CPU without relinquishing it. Finally, no process is allowed to do its own I/O, to protect the
integrity of the various peripheral devices. Protection refers to a mechanism for controlling
the access of programs, processes, or users to the resources defined by a computer
controls to be imposed, together with some means of enforcement. Protection can improve
reliability by detecting latent errors at the interfaces between component subsystems.
Early detection of interface errors can often prevent contamination of a healthy subsystem
by a subsystem that is malfunctioning. An unprotected resource cannot defend against use
(or misuse) by an unauthorized or incompetent user.
e) Deadlock Prevention:
A condition that occurs when two processes are each waiting for the other to
complete before proceeding. The result is that both processes hang. In operating
systems, a deadlock situation is arrived when computer resources required to complete a
computing task which are held by another task that is waiting to execute.
f)Memory Management
Memory is the most expensive part in the computer system. Memory is a large
array of words or bytes, each with its own address. Interaction is achieved through a
sequence of reads or writes of specific memory address. The CPU fetches from and stores
in memory. There are various algorithms that depend on the particular situation to
manage the memory. Selection of a memory management scheme for a specific system
depends upon many factors, but especially upon the hardware design of the system. Each
algorithm requires its own hardware support. The operating system is responsible for the
following activities in connection with memory management.
Keep track of which parts of memory are currently being used and by whom.
Decide which processes are to be loaded into memory when memory space becomes
available.
Allocate and deallocate memory space as needed.
No comments:
Post a Comment