Professional Documents
Culture Documents
Services and Component of Operating System1
Services and Component of Operating System1
Services and Component of Operating System1
Mark 08
SERVICES AND COMPONENT OF OPERATING SYSTEM
Introduction-
An operating system provides and environment for the execution of program.
It provides certain services to the program and to the user of those program.
The specific services provided by operating system is different from one operating system to
another but we can identify common classes use operating system services are provided for
the convenience of the programmer.
To make the programming tasks easier.
Operating SystemServices
Oneset ofoperating-system services provides functions that arehelpful tothe user
Communications– Processes may exchange information, on the same computer orbetween
Computers. Over a network Communications may be via shared memory or through message
Passing packets moved by the OS.
Error detection – OS needs to be constantly aware of possible errors May occur in the CPU and
memory hardware, inI/O devices, in user programForeach typeof error, OS should takethe
appropriate action to ensure correct and consistent computing Debugging facilities can greatly
enhance the user’s and programmer’s abilities to efficiently use the system.Another set of OS
functions exists for ensuring the efficient operation of the system itself via resource sharing
Resource allocation-When multiple users or multiple jobs running concurrently, resources
must be allocated to each of them
Manytypes of resources-Some (such as CPU cycles, main memory, and file storage) may have
special allocation code, others (such as I/O devices) may have general request and release code
Accounting-To keep track of which users use how much and what kinds of computer resources
Protection and security-The owners of information stored in a multiuser or networked
computer system may want to control use of that information, concurrent processes should not
interfere with each other
Protection involves ensuring that all access to system resources is controlled
Security of the system from outsiders requires user authentication, extends to defending external
I/O devices from invalid access attempts If a system is to be protected and secure, precautions
must be instituted throughout it. A chain is onlyas strongas its weakest link.
1. Process Control
A running program needs to be able to stop execution either normally or
abnormally. When execution is stopped abnormally, often a dump of memory is
taken and can be examined with a debugger.
2. File Management
Some common system calls are create, delete, read, write, reposition, or close.
Also, there is a need to determine the file attributes – get and set file attribute.
Many times the OS provides an AP It make these system calls.
3. Device Management
Process usually requires several resources to execute, If these resources are
available, they will be granted and control returned to the user process .These
resources are also thought of as devices. Some are physical, such as a video card,
and others are abstract, such as a file.
User programs request the device, and when finished they release the device.
Similar to files, we can read, write, and reposition the device.
4. Information Management
Some system calls exist purely for transferring information between the user
program and the operating system .An example of this is time, or date.
The OS also keeps information about all its processes and provides system calls
to report this information.
5. Communication
There are two model so inter process communication, the message-passing
model and the shared memory model.
Message-passing uses a common mail box to pass messages between processes.
Shared memory use certain system calls to create and gain access to create and
gain access to regions of memory owned by other processes. The two processes
exchange information by reading and writing in the shared data.
Process Management
A process is a program in execution. It is a unit of work within the system. Program is a
Passive entity, process is an active entity.
Process needs resources to
accomplish its task
CPU,
memory,
I/O, files
Initializati
On data
Process termination requires reclaim of any
reusable resource
Single-threaded process has one program counter specifying location of next
instruction to execute
Process executes instructions sequentially, one at a time,
until completion
Multi-threaded process has one program counter
Per thread
Typically system has many processes, some user, and some operating system running
concurrently on one or more CPUs
Concurrency by multiplexing the CPU among the processes/ threads
Mass-Storage Management
Usually disks used to store data that does not fit in main memory or data that must b kept
for a ―long period of time Proper managements of central importance