
Introduction
Unix is a computer operating system developed in the 1970s by Ken Thompson, Dennis Ritchie, and others in the AT&T Laboratories. An operating system is a software program needed to manage and operate a computing device like tablets, computers, supercomputers, web servers, cars, smartwatches, etc. It is a graphical user interface (GUI) layer between the user and the computer hardware.
- Unix is capable of handling activities from multiple users and multiple tasks simultaneously.
- The similarity between Microsoft Windows and UNIX's graphical user interface makes it easy to use.
- There are many versions of UNIX, but they have some common similarities. The most popular types of UNIX are Sun Solaris, GNU/Linux, and macOS X.
Also see, Types of UNIX Operating Systems, Multiprogramming vs Multitasking
System Structure of Unix
The UNIX operating system consists of three parts; the kernel, the shell, and the file system.
- The Kernel: The kernel is the heart of the operating system and acts as an interface between the user and hardware. The kernel is the only component that can communicate directly with the hardware.
Following are some of the essential functionalities provided by a kernel:
- Manage hardware devices like memory and other I/O devices.
- User and process management in the case of a multi-user environment.
- Managing priorities of processes.
- Inter-Process Communication (IPC) management.
In previous days all the programs related to the kernel were combined into a single module and are available in the memory. Such a kernel is known as a monolithic kernel.
Nowadays, the programs are divided into several modules, and only those required modules are stored in the memory. Such a modular kernel is known as a microkernel.
2. The Shell: The shell is an interface between the user and the kernel. The shell is a command-line interpreter (CLI). It interprets user commands and arranges them to be carried out.
We execute commands at the shell. When a command line is given at the prompt, the shell performs the steps mentioned below:
- It parses the command line, identifies words in it, and removes any additional spaces or tabs present if any.
- Evaluate all the variables that are prefixed with $.
- The shell performs command substitution (done using backquotes).
- It checks for any I/O redirection and establishes the connectivity between the files accordingly.
- Then it checks for the presence of wild card characters like *,? And, If any of the characters are present, file name generation and substitution occur.
It then looks for the required commands and files, retrieves them, and hands them to the kernel for execution. The path used for looking out for the needed commands will be in the PATH shell variable. Also, the semicolon, which allows multiple commands, and logical operators, are taken care of by the shell.
3. The File System: The File Systems controls how data is stored and retrieved. Unix treats everything (including hardware devices) as a file. All the files in a Unix system are organized as an inverted tree-like structure. This hierarchical structure in which all the files are stored is called a file system.
A file system could be local or distributed. Local file systems store and manage their data directly connected to the system. Distributed file systems allow users to access files stored on remote machines, which can be accessed through a network.
You can also read about the Multilevel Queue Scheduling.
Must Read Evolution of Operating System