Basics Flashcards
Kernel
The kernel is tasked, first and foremost, with controlling the computer’s hardware components. It detects and configures them when the computer powers on, or when a device is inserted or removed (for example, a USB device). It also makes them available to higher-level software, through a simplified programming interface, so applications can take advantage of devices without having to address details such as which extension slot an option board is plugged into.
Unifying File Systems
File systems are a prominent aspect of the kernel. Unix-like systems merge all the file stores into a single hierarchy, which allows users and applications to access data by knowing its location within that hierarchy.
Hierarchical Tree
The starting point of a default Linux system’s hierarchical tree is called the root, represented by the ‘/’ character. This directory can contain named subdirectories. For instance, the home subdirectory of / is called /home/; Translated to Root-Home. This subdirectory can, in turn, contain other subdirectories, and so on. Each directory can also contain files, where data will be stored. Thus, /home/busxy/Desktop/hello.txt refers to a file named hello.txt stored in the Desktop subdirectory of the buxy subdirectory of the home directory, present in the root. The kernel translates between the naming system this way to get to the storage location on a disk.
One Hierarchy System
Unlike other systems, Linux possesses only one hierarchy, and it can integrate data from several disks. One of these disks becomes the root, and the others are mounted on directories in the hierarchy. ( The Linux command is called ‘mount’) The other disks are then available under the mount points. This allows storing users’ home directories on a (traditionally stored within /home/) on a separate hard disk, which will contain the buxy directory (along with home directories of other users). Once you mount the disk on /home/, these directories become accessible at their usual locations, and paths such as /home/buxy/Desktop/hello.txt keep working.
Managing Processes
A process is a running instance of a program, which requires memory to store both the program itself and its operating data. The kernel is in charge of creating and tracking processes. When a program runs, the kernel first sets aside some memory, loads the executable code from the file system into it, and then starts the code running. It keeps information about this process, the most visible of which is an identification number known as the ‘Process Identifier’ (PID).
Multi-Tasking
There can actually be only one process running at any one time, but the kernel divides CPU time into small slices and runs each process in turn. Since these times slices are very short (in the millisecond range), they create the appearance of processes running in a parallel, although they are active only during their time interval and idle the rest of the time. The kernel’s job is to adjust its scheduling mechanisms to keep that appearance while maximizing global system performance. If the time slices are too long, the application may not appear as responsive as desired. Too short, and the system loses time by switching tasks too frequently. These decisions can be refined with process priorities, where high-priority processes will run for longer periods and with more frequent time slices than low-priority processes.
Multi-Processor Systems (and Variants)
The limitation of only one process running at a time doesn’t always apply. The actual restriction is that there can only be one running process per processor core. Multi-processor, Multi-core, or hyper-threaded systems allow several processes to run in parallel. The same time-slicing system is used, though, to handle cases where there are more active processes than available processor cores. This is not unusual: abasic system, even a mostly idle one, almost always has tens of running processes.
Data Independence
The kernel allows several independent instances of the same program to run, but each is allowed to access only its own time slices and memory. Their data thus remain independent.
Rights Management.
Most of the time, a process is identified by the user who started it. The process is only permitted to take actions permitted for its owner.