Hardware Reference
In-Depth Information
bickering, a standard called POSIX ( Portable Operating System-IX ) was created
by the IEEE Standards Board. POSIX is also known by its IEEE Standards num-
ber, P1003. It later became an International Standard.
The standard is divided into many parts, each one covering a different area of
UNIX . The first part, P1003.1, defines the system calls; the second part, P1003.2,
defines the basic utility programs, and so on. The P1003.1 standard defines about
60 system calls that all conformant systems must support. These are the basic calls
for reading and writing files, creating new processes, and so on. Nearly all UNIX
systems now support the P1003.1 system calls. However many UNIX systems also
support extra system calls, especially those defined by System V and/or those in
Berkeley UNIX . Typically these add up to 200 system calls.
In 1987, one author of this topic (Tanenbaum) released the source code for a
tiny version of UNIX , called MINIX , for use at universities (Tanenbaum, 1987).
One of the students who studied MINIX at his university in Helsinki and ran it on
his home PC was Linus Torvalds. After becoming thoroughly familiar with
MINIX , Torvalds decided to write his own clone of MINIX , which was called Linux
and has become quite popular.
Many operating systems running today on ARM platforms are based on Linux.
Both MINIX and Linux are POSIX conformant, and nearly everything said about
UNIX in this chapter also applies to them unless stated otherwise.
A rough breakdown of the Linux system calls by category is given in
Fig. 6-30. The file- and directory-management system calls are the largest and the
most important categories. Linux is mostly POSIX P1003.1 compliant, although
the developers did deviate from the specification in some areas. In general, howev-
er, it is not difficult to get POSIX-compliant programs to build and run on Linux.
Category Some examples
File management Open, read, write, close, and lock files
Directory management Create and delete directories; move files around
Process management Spawn, terminate, trace, and signal processes
Memory management Share memory among processes; protect pages
Getting/setting parameters Get user, group, process ID; set priority
Dates and times
Set file access times; use interval timer; profile execution
Networking
Establish/accept connection; send/receive message
Miscellaneous
Enable accounting; manipulate disk quotas; reboot the system
Figure 6-30. A rough breakdown of the UNIX system calls.
One area that is largely due to Berkeley UNIX rather than System V is net-
working. Berkeley invented the concept of a socket , which is the endpoint of a
network connection. The four-pin wall plugs to which telephones can be con-
nected served as the model for this concept. It is possible for a UNIX process to
create a socket, attach to it, and establish a connection to a socket on a distant
 
 
Search WWH ::




Custom Search