Ubuntu Linux Architecture
Ubuntu is one of the famous linux distributions, as i know desktop linux distribution is free, we can download from https://ubuntu.com/download/desktop
- Hardware − Hardware consists of all physical devices attached to the System. For example: Hard disk drive, RAM, Motherboard, CPU etc.
- Kernel − Kernel is the core component for any (Linux) operating system which directly interacts with the hardware.
- Shell − Shell is the interface which takes input from Users and sends instructions to the Kernel, Also takes the output from Kernel and send the result back to output shell.
- Applications − These are the utility programs which runs on Shell. This can be any application like Your web browser, media player, text editor etc.
- User — someone who login to linux operating system
The kernel is primarily responsible for four main functions:
- System memory management
- Software program management
- Hardware management
- Filesystem management
A. System Memory Management
Virtual memory, or virtual storage is a memory management technique that provides an “idealized abstraction of the storage resources that are actually available on a given machine” which “creates the illusion to users of a very large (main) memory”. kernel will manage hard disk and RAM to create virtual memory. The kernel swaps the contents of virtual memory locations back and forth from the swap space to the actual physical memory. This allows the system to think there is more memory available than what physically exists.
B. Software program management
The Linux operating system calls a running program a process. A process can run in the foreground, displaying output on a display, or it can run in the background, behind the scenes. The kernel controls how the Linux system manages all the processes running on the system. The kernel creates the first process, called the init process, to start all other processes on the system. When the kernel starts, it loads the init process into virtual memory. As the kernel starts each additional process, it gives it a unique area in virtual memory to store the data and code that the process uses.
C. Hardware management
Kernel will manage the linux hardware to communicate appropriately. Kernel will manage like a process scheduler, so there is no race condition or deadlock process. For the abstraction we can read about the dining philosopher problem.
D. Filesystem management
A file system defines how files are named, stored, and retrieved from a storage device. For example in windows, the files structure consist of directory and filename structure. We can manage the directory with the good structure. File system management depend to kind of storage type, like FAT32, exFAT, NTFS and soon.
Ubuntu File Structure
It is overview about ubuntu structure directory.
Environment variable
Environment variable is variable that can be used by operating system, application (browser, golang application and soon). By defining an environment variable we don’t need to bother about defining variables on each application.
In linux, it has built-in syntax that is “export” for declaring variables that can be used by bash script command.
Example :
We can also add environment variables through ~/.profile example :
Source :
https://tecadmin.net/tutorial/linux/linux-architecture/
Ubuntu linux unleashed 2021 edition pdf