0% found this document useful (0 votes)
2 views6 pages

System ProgramSystem Calls

The document outlines five types of system calls: Process Control, File Management, Device Management, Information Maintenance, and Communication, detailing their functions and examples. It also describes system programs, which serve as a bridge between user interfaces and system calls, and categorizes them into seven types including File Manipulation and Programming Language Support. Overall, it emphasizes the role of system calls and programs in managing processes, files, devices, and communication within an operating system.

Uploaded by

joshimeena22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

System ProgramSystem Calls

The document outlines five types of system calls: Process Control, File Management, Device Management, Information Maintenance, and Communication, detailing their functions and examples. It also describes system programs, which serve as a bridge between user interfaces and system calls, and categorizes them into seven types including File Manipulation and Programming Language Support. Overall, it emphasizes the role of system calls and programs in managing processes, files, devices, and communication within an operating system.

Uploaded by

joshimeena22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Types of System Calls

There are commonly five types of system calls. These are as follows:

1. Process Control
2. File Management
3. Device Management
4. Information Maintenance
5. Communication

Now, you will learn about all the different types of system calls one-by-one.

1. Process Control

Process control is the system call that is used to direct the processes. Some process
control examples include creating, load, abort, end, execute, process, terminate the
process, etc.

Here's a closer look at how it all works out:

o Process Creation: Every time you start a new application, an operating system
calls into life and assigns it a process. It then assigns it a unique process ID and
gives it all the required resources, such as memory, that will enable it to begin
its start-up.
o Scheduling of Processes: The operating system needs to decide which process
gets its turn with the CPU. It achieves this with scheduling algorithms—kind of
like making sure every person in line gets their turn at the checkout. This keeps
things moving without waiting, whether it is a first-come-first-served approach
or prioritizing specific tasks.
o Process Execution: After a process is born, it's time to run the program. OS
swaps between processes, ensuring that your computer is multitasking. Imagine
jugglers tossing balls: every time one goes to the floor, another snatched off
the return in mid-air. That is how the CPU manages all sorts of processes!
o Suspension and Resumption: At other times, processes are suspended to free
up resources or let other more important processes run. The system saves its
state so it can pick up right where it left off when resumed, just like hitting the
pause button in a video game.
o Process Termination: Every process eventually needs to terminate-it either
finishes its work or an error occurs. In the case of an OS, it simply deallocates
that resource from memory and gets rid of it, making everything neat and clean.
o Inter-process Communication (IPC): Processes sometimes need to
communicate with other processes. To achieve this, the OS has facilities like
message passing or shared memory. Think of two friends texting each other;
that's the way processes communicate.
o Synchronization: Sometimes, processes desire to share resources - files or
memory, for example. However, if they all wish to access a resource
simultaneously, things may become somewhat unravelled. So, in order to
prevent this kind of chaos, the OS uses tools such as semaphores and mutexes,
which are in charge of orchestrating everything smoothly so that no such
conflict might arise.
o Deadlock Handling: Deadlock is where the processes are deadlocked, waiting
for each other's resources, people holding doors open for one another, and
neither can get through. The OS has strategies to avoid or resolve these
situations, ensuring that no process is deadlocked for an indefinite amount of
time.

2. File Management

So, File Management basically refers to how your computer handles the organization
and manipulation of files. It is rather like storing your physical documents in a drawer:
each file has to be created, opened, edited, and perhaps sometimes even trashed. The
OS takes care of everything behind the scenes.

Alright, let's break it down a bit:

o Creating Files: Each time you save a new document or program, your computer
creates a file. It gives it a location on the hard drive or other storage - much the
way you might put a paper file into a folder.
o Opening Files: To look at or edit a file, you open it. The operating system will
retrieve it so that you can view it or work on it.
o Reading Files: Once the file is opened, one can read what is inside. Be it a text
file, an image, or anything else, the OS will call from storage to be viewed and
worked with.
o Writing to Files: Every time you make a change—either by typing into a
document or touching up a picture—the operating system writes those changes
to the file.
o Closing Files: When you are finished with it, closing the file saves everything
and marks it as not in use. It is like putting the document back in its folder when
you are finished reading or modifying it.
o File Deletion: You just delete files whenever you think they should not be in
your system again. The operating system would then delete them from your
storage, creating more space for other things.
o Controlling Permissions: You might sometimes need to control who can
access and edit some of the files. The OS allows you to set permissions for each
file so that you may choose whether someone else can run, alter, or open it.

3. Device Management

Device management is a system call that is used to deal with devices. Some examples
of device management include read, device, write, get device attributes, release device,
[Link] device management does;

o Reading from Devices: Whenever the computer wants to read data from the
device, be it reading a file off of your hard drive or input from the keyboard, the
operating system handles that request. It makes sure the data is read right and
then forwarded to the right place.
o Writing to Devices: whenever you need to export data to a device, such as
saving the file of your report to the USB stick or just printing it, the OS takes
care of it and makes sure that all the data gets written to the device in the right
way.
o Getting Device Attributes: The OS can get such information about a device,
say, its status or settings. For example, it can check what is available on disk or
the level of the battery of a wireless mouse.
o Allocation of Resources: OS decides how many of the system resources like
memory or processing power a device gets, so no device gets more than its
share, and the whole thing runs without problems.
o Release Devices: The OS releases a device, that is, frees system resources
allocated for that device once it has completed all its work. Essentially, it is as
safe as pulling a USB drive out of the computer after you are done with it.
o Handling Interrupts: Devices often send signals to the CPU, termed as
interrupts, claiming its attention. The OS handles these interruptions so that it
will come to know whenever a device needs attention and deal with them in the
right sequence.
4. Information Maintenance

Information maintenance is a system call that is used to maintain information. There


are some examples of information maintenance, including getting system data, set
time or date, get time or date, set system data, etc.. The usual information maintenance
in everyday life activities are;

o Get System Data: It fetches information about the system that it actually is,
such as CPU or memory usage, network status, etc. It keeps records of all the
resources in use.
o Set System Data: The OS can, whenever needed, change some of the
configurations associated with the systems, such as changing system behaviour,
updating configurations, setting user preferences, etc.
o Retrievability of Time or Date: OS can retrieve the time and date of the
system, which is used in many applications such as file timestamp, logging and
scheduling.
o Setting Time or Date: The system may update the current time and date when
necessary; thus, accurate times and dates can be appended to files or processes
or synchronized with an external time clock.
o System logs and audits: The operating system maintains an event log and
activity record of errors, system performance, or user actions. It is primarily used
for debugging and monitoring the system.

5. Communication

Communication is a system call that is used for communication. There are some
examples of communication, including create, delete communication connections,
send, receive messages, [Link] activities involved in communication are as follows:

o Setting Up Communication Links: OS connects two processes or devices


through a communication channel. The connection may be performed using
sockets, pipes, or shared memory; thus, it facilitates easy communication
between these two processes or devices.
o Closing Communication Links: OS dismantles or deletes a link if its
communication process is complete; resources are released, and the system is
not affected.
o The OS ensures that a message or data sent by one process or system reaches
the target recipient, either locally or on a network.
o Receiving Messages: The receiving process gets the data sent by another
process. The OS manages the incoming messages and makes sure that it is
delivered to the correct target.
o Manages the protocols of communication: The OS manages rules as well as
communications protocols, which enable data to be both sent and received in
appropriate formats and sequences.

System Program
System programs provide an environment where programs can be developed
and executed. In the simplest sense, system programs also provide a bridge
between the user interface and system calls. In reality, they are much more
complex. For example: A compiler is a complex system program.

An image that describes system programs in the operating system hierarchy is as


follows –

In the above image, system programs as well as application programs form bridge
between the user interface and the system calls. So, from the user view the
operating system observed is actually the system programs and not the system
calls.

Types of System Programs


System programs can be divided into seven parts. These are given as follows −

File Manipulation
These system programs are used to manipulate system files. This can be done
using various commands like create, delete, copy, rename, print etc. These
commands can create files, delete files, copy the contents of one file into another,
rename files, print them etc.

Status Information
The status information system programs provide required data on the current or
past status of the system. This may include the system date, system time, and
available memory in system, disk space, logged in users etc.

File Modification
System programs that are used for file modification basically change the data in
the file or modify it in some other way. Text editors are a big example of file
modification system programs.

Programming Language Support


These system programs provide additional support features for different
programming languages. Some examples of these are compilers, debuggers etc.
These compile a program and make sure it is error free respectively.

Program Loading and Execution


The system programs that deal with program loading and execution make sure
that programs can be loaded into memory and executed correctly. Loaders and
Linkers are a prime example of this type of system programs.

Communications
These system programs are needed for system communications such as web
browsers. Web browsers allow systems to communicate and access information
from the network as required.

Application Programs
Application programs can perform a wide range of services as per the needs of
the users. These include programs for database systems, word processors,
plotting tools, spreadsheets, games, scientific applications etc.

You might also like