See provide environments in which programs run, and services for the users of the system,
including:
User Interfaces - Means by which users can issue commands to the system. Depending
on the system these may be a command-line interface ( e.g. sh, csh, ksh, tcsh, etc. ), a
GUI interface ( e.g. Windows, X-Windows, KDE, Gnome, etc. ), or a batch command
systems.
Program Execution - The OS must be able to load a program into RAM, run the
program, and terminate the program, either normally or abnormally.
I/O Operations - The OS is responsible for transferring data to and from I/O devices,
including keyboards, terminals, printers, and storage devices.
File-System Manipulation - In addition to raw data storage, the OS is also responsible
for maintaining directory and subdirectory structures, mapping file names to specific
blocks of data storage,
Communications – Exchange of information between process executing either on same
computer or on different system tied together by a network. It is implemented via shared
memory or message passing.
Additionally functions used ensuring efficient system operation.
, Error Detection - Both hardware and software errors must be detected and handled
appropriately OS. For each type of OS should take the appropriate action to ensure that
correct and consistent computing.
Resource Allocation - E.g. CPU cycles, main memory, storage space, and peripheral
devices. Allocating resources to multiple users or multiple jobs running at the same time.
Accounting - Keeping track of system activity and resource usage, either for billing
purposes or for statistical record keeping that can be used to optimize future performance.
Protection and Security – The information stored in a multi user computer system may
want to control use of that information. protection ensure that all access to system
resource controlled.
System Calls
System call provides an interface between a running program and operating system.
It allows user to access services provided by operating system.
This system calls are procedures written using C, C++ and assembly language
instructions. Each operating system has its own name for each system call.
This can be performed by two modes of operations in which program can execute user
mode and kernel mode.
When a program is executing in user mode it is not having any access to memory,
hardware and other resources.
When a program is executing in kernel mode it is having direct access to memory,
hardware and other resources.
Fig. Example of system call.
2.2.1 System call Implementation