This Blog provide simple notes in simple language of computer science and engineering.

Saturday 16 February 2019

system call

No comments
System call is
Programming interface to the services provided by the OS
Typically written in a high-level language (C or C++)
Mostly accessed by programs via a high-level Application Programming
Interface (API) rather than direct system call use
Three most common APIs are Win32 API for Windows, POSIX API for POSIX-
based systems (including virtually all versions of UNIX, Linux, and Mac OS X),
and Java API for the Java virtual machine (JVM).

Example of System Calls
System call sequence to copy the contents of one file to another file

Types of System Calls
Process control
o create process, terminate process
o end, abort
o load, execute
o get process attributes, set process attributes
o wait for time
o wait event, signal event
o allocate and free memory
o Locks for managing access to shared data between processes
File management
o create file, delete file
o open, close file
o read, write, reposition
o get and set file attributes
Device management
o request device, release device
o read, write, reposition
o get device attributes, set device attributes
o logically attach or detach devices
Information maintenance
o get time or date, set time or date
o get system data, set system data
o get and set process, file, or device attributes
Communications
o create, delete communication connection
o send, receive messages if message passing model to host name or
process name from client to server
o Shared-memory model create and gain access to memory regions
o transfer status information
o attach and detach remote devices
Protection
o Control access to resources
o Get and set permissions
o Allow and deny user access

No comments :

Post a Comment