The system libraries (e.g. glibc) define a standard set of functions through which applications interact with the kernel, and which implement much of the operating-system functionality that does not need the full privileges of kernel code.
System call is the mechanism used by an application program to request service from the operating system.
API is a function definition that specifies how to obtain a given service(ex.calloc,malloc ,free etc.), while System call is an explicit request to the kernel made via a software interrupt (ex.brk)
Thread is a unit of execution or objects of activity within process.
Thread is simply a new process that happens to share the same address space as its parent
Process creation: fork () creates a child process that is a copy of current process. it differs in PID,PPID. exec() loads new executable in to address space. clone() creates a new process(LWP) with its own identity, but that is allowed to share the data structures of its parent.
Process Termination: when process calls system call exit(). Process can also terminate involuntarily by signals or exceptions it can not handle or ignore.
The VM system maintains the address space visible to each process: It creates pages of virtual memory on demand, and manages the loading of those pages from disk or their swapping back out to disk as required.
The VM manager maintains two separate views of a process’s address space:
A logical view describing instructions concerning the layout of the address space. The address space consists of a set of non overlapping regions, each representing a continuous, page-aligned subset of the address space.
A physical view of each address space which is stored in the hardware page tables for the process.
The Virtual Filesystem (also known as Virtual Filesystem Switch or VFS) is a kernel software layer that handles all system calls related to a standard Unix filesystem. Its main strength is providing a common interface to several kinds of filesystems.
ex. copy a file from MS-dos filesystem to Linux
Device drivers take on a special role in the Linux kernel. They are distinct “black boxes” that make a particular piece of hardware respond to a well-defined internal programming interface; they hide completely the details of how the device works.
Linux Device Driver are categorised in three types such as
The network stack, by design, follows a layered architecture modeled after the protocols themselves. Recall that the Internet Protocol is the core network layer protocol that sits below the transport protocol . Above TCP is the sockets layer, which is invoked through the SCI.
The sockets layer is the standard API to the networking subsystem and provides a user interface to a variety of networking protocols. From raw frame access to IP protocol data units and up to TCP and the User Datagram Protocol (UDP), the sockets layer provides a standardized way to manage connections and move data between endpoints.
While much of Linux is independent of the architecture on which it runs, there are elements that must consider the architecture for normal operation and for efficiency. The ./linux/arch subdirectory defines the architecture-dependent portion of the kernel source contained in a number of subdirectories that are specific to the architecture . For a typical desktop, the i386 directory is used. Each architecture subdirectory contains a number of other subdirectories that focus on a particular aspect of the kernel, such as boot, kernel, memory management, and others.