16 UNIX and Linux
Fig. 16.1: The shell and the kernel.
Images and Processes Image –an execution environment –the pseudo-computer concept –components text segment data segment stack segment Process –the execution of an image
Fig. 16.2: An image.
Fig. 16.3: The text segment is reentrant. The data and stack segments are private.
Process Creation Fig. 16.4a: The parent calls fork.
Fig. 16.4b: the child calls exec.
Fig. 16.4c: exec overlays the child’s text and data segments.
Fig. 16.4d: When the child dies, the parent resumes processing.
Fig. 16.5: The possible contents of memory on a system supporting four concurrent users.
Fig. 16.6: The process table contains one entry per process.
Events and Signals Event generated by death of a process Event produces signal event-wait routine activated –awaken all processes waiting for event –start highest priority ready process
Time-slicing and Interrupts Time-slicing –programs limited to a single time slice –exceeding time slice generates an event –event-wait starts highest priority process Interrupts –interrupt handling routines in kernel
Fig. 16.7: The swapping process is part of the kernel.
Fig. 16.8: A text table.
The File System Data treated as strings of bytes Device types –block devices hold files –character devices File types –ordinary files –special files
Fig. 16.9: A configuration table lists all the device drivers.
Fig : A UNIX disk is divided into four regions.
Fig : Associated with the file name is an i-number that points to a specific i-node.
Fig : The process file table points to the system file table, which points to the file on disk.
The Buffer Pool All block I/O through buffer pool Read implies a buffer search Write –mark appropriate buffer dirty –transfer to disk when buffer reassigned Physical I/O asynchronous
Fig : A summary of key UNIX system tables.
Linux The Linux kernel –deals directly with hardware –load/unload specific modules Linux processes –call fork or clone to create –personality identifier The Linux file system (ex2fs) –virtual file system (VFS)
Fig : The virtual file system allows processes to access all file systems uniformly.