Tafadzwa Rugwejera
And
Lewis Sangare
System Calls
A system call is a request for service that a
program makes of the kernel. The service is
generally something that only the kernel has the
privilege to do, such as doing I/O.
System calls:
Provide an interface between the process an the
operating system.
Allow user-level processes to request some
services from the operating system which
process itself is not allowed to do.
System Calls
In handling the trap, the operating system will
enter in the kernel mode, where it has access
to privileged instructions, and can perform
the desired service on the behalf of user-level
process. It is because of the critical nature of
operations that the operating system itself
does them every time they are needed. For
example, for I/O a process involves a system
call telling
the operating system to read or write
particular area and this request is satisfied by
the operating system.
Following are the five services provided by
operating systems to the convenience of the users.
Program Execution
I/O Operations
File System Manipulation
Communications
Error Detection
Program Execution
The purpose of a computer system is to allow the
user to execute programs. So the operating system
provides an environment where the user can
conveniently run programs. The user does not
have to worry about the memory allocation or
multitasking or anything. These things are taken
care of by the operating systems.
Running a program involves the allocating and de-
allocating memory, CPU scheduling in case of
multi processes. These functions cannot be given
to the user-level programs. So user-level programs
I/O Operations
Each program requires an input and produces
output. This involves the use of I/O. The operating
systems hides the user the details of underlying
hardware for the I/O. All the user sees is that the
I/O has been performed without any details. So the
operating systems by providing I/O make it
convenient for the users to run programs.
For efficiently and protection users cannot control
I/O so this service cannot be provided by user-
level programs.
File System Manipulation
The output of a program may need to be written
into new files or input taken from some files. The
operating systems provide this service. The user
does not have to worry about secondary storage
management. User gives a command for reading
or writing to a file and sees his/her task
accomplished. Thus operating systems make it
easier for user programs to accomplish their task.
This service involves secondary storage
management. The speed of I/O that depends on
secondary storage management is critical to the
speed of many programs and hence I think it is
File System Manipulation
It is not difficult for the user-level programs to
provide these services but for above mentioned
reasons it is best if this service s left with
operating system.
Communications
There are instances where processes need to
communicate with each other to exchange
information. It may be between processes running
on the same computer or running on the different
computers. By providing this service the operating
system relieves the user of the worry of passing
messages between processes. In case where the
messages need to be passed to processes on the
other computers through a network it can be done
by the user programs. The user program may be
customized to the specifics of the hardware
through which the message transits and provides
Error Detection
An error is one part of the system may cause
malfunctioning of the complete system. To avoid
such a situation the operating system constantly
monitors the system for detecting the errors. This
relieves the user of the worry of errors
propagating to various part of the system and
causing malfunctioning.
This service cannot be allowed to be handled by
user programs because it involves monitoring and
in cases altering area of memory or de-allocation
of memory for a faulty process or may be
relinquishing the CPU of a process that goes into
A user program if given these privileges can
interfere with the correct (normal) operation of the
operating systems.
Tafadzwa Rugwejera MIF 209
Lewis Sangare MIF 682
Thank You!
OPERATING SYSTEMS
BMIS 1.2 2012 TRUST ACADEMY