You are on page 1of 5

Types of System Calls

Process control
l end, abort
l load, execute
l create process, terminate process
l get process attributes, set process attributes
l wait for time
l wait event, signal event
l allocate and free memory

File management
l create file, delete file
l open, close file
l read, write, reposition
l get and set file attributes

Process control
l end, abort
l load, execute
l create process, terminate process
l get process attributes, set process attributes
l wait for time
l wait event, signal event
l allocate and free memory

File management
l create file, delete file
l open, close file
l read, write, reposition
l get and set file attributes

Device management
l request device, release device
l read, write, reposition
l get device attributes, set device attributes
l logically attach or detach devices

Information maintenance
l get time or date, set time or date
l get system data, set system data
l get and set process, file, or device attributes

Communications
l create, delete communication connection
l send, receive messages
l transfer status information
l attach and detach remote devices

System Programs
System programs provide a convenient environment for program
development and execution.

Most users view of the operation system is defined by system programs, not
the actual system calls

They can be divided into:


1. File manipulation
2. Status information
3. File modification
4. Programming language support
5. Program loading and execution
6. Communications
7. Application programs

File management
Create, delete, copy, rename, print, dump, list, and generally manipulate files
and directories

Status information
Some ask the system for info - date, time, amount of available memory, disk
space, number of users
Others provide detailed performance, logging, and debugging information
Typically, these programs format and print the output to the terminal or other
output devices
Some systems implement a registry - used to store and retrieve configuration
information

File modification

Text editors to create and modify files


Special commands to search contents of files or perform transformations of
the text

Programming-language support
Compilers, assemblers, debuggers and interpreters sometimes provided

Program loading and execution


Absolute loaders, relocatable loaders, linkage editors, and overlay-loaders,
debugging systems for higher-level and machine language

Communications
Provide the mechanism for creating virtual connections among processes,
users, and computer systems
Allow users to send messages to one anothers screens, browse web pages,
send electronic-mail messages, log in remotely, transfer files from one
machine to another

Advantage of the layered approach


The main advantage of the layered approach is modularity. The layered are
selected such that each uses function and services of only lower level layers.
This approach simplifies debugging and system verification In this case the
system is easier to debug and modify, because changes affect only limited
portions of the code, and programmer does not have to know the details of
the other layers. Information is also kept only where it is needed and is
accessible only in certain ways, so bugs affecting that data are limited to a
specific module or layer

Disadvantages of layered Approach

It is difficult to organize the system in layers, because a layer can


use only layers below it. Example: virtual memory (lower layer)
uses disk I/O (upper layer).

Layered implementations tend to be less efficient than other

types. Example: there may be too many calls going down the
layers: user to I/O layer to memory layer to process scheduling
layer

can be hard to decide how to split functionality into layers


less efficient due to high overhead

Why do some systems store the operating


system in rmware, while others store it
on disk?
Answer: For certain devices, such as handheld PDAs and cellular
telephones, a disk with a file system may be not be available for the
device. In this situation, the operating systemmust be stored in
firmware.

It is sometimes difcult to achieve a layered approach, if


two components of the operating system are dependent
on each other. Identify a scenario in which it is unclear
how to layer two system components that require tight
coupling of their functionalities
Answer: The virtual memory subsystem and the storage subsystem
are typically tightly-coupled and requires careful design in a layered
system due to the following interactions. Many systems allow files to
be mapped into the virtual memory space of an executing process. On
theotherhand,thevirtualmemorysubsystemtypicallyusesthestorage
system to provide the backing store for pages that do not currently
reside in memory. Also, updatesto the filesystemare sometimes
buffered in physical memory before it is ushed to disk, thereby
requiring careful coordination of the usage of memory between the
virtual memory subsystem and the filesystem.

You might also like