DEV Community

Cover image for UNIX Basics - Architecture of UNIX

UNIX Basics - Architecture of UNIX

yadunandanbhat profile image Yadunandan Bhat ・2 min read

In my last post, I've talked about what is UNIX and it's history. In this second part of the UNIX Basics series, I'll be explaining the architecture of UNIX.

The whole architecture of UNIX can be divided into 4 different layers. They are

  • Hardware
  • Kernel
  • Shell
  • Applications

UNIX Architecture

The hardware part is all the hardware in the computer, like memory, hard disk, input devices, output devices.

The kernel is the core of the UNIX operating system. This is the most powerful of all the four. The kernel is the one that interacts with the computer hardware. This is loaded into memory whenever the system starts up. The kernel provides a lot of support for the application program. It also does housekeeping jobs like process management, scheduling, file management, device management, network management, memory management, and other jobs that the user shouldn't bother about. It is always running, even if no program is currently running.

The shell's job is to act as an interpreter. When the user gives the command, the shell reads the commands, understands them, and then sends a request to execute the program. Then when the program is executed it again sends the request to display the program to the user on-screen. The shell is also like an interface between the user and the kernel. Even though there’s only one kernel running on the system, there could be several shells in action, one for each user who is logged in.

The applications are normal user applications or system applications. The applications can access the hardware using the special functions of kernel called System Calls. These are a set of routines mostly written in C, used to communicate with hardware directly.

While talking about UNIX architecture, we also talk about its filesystem. UNIX considers everything as a file, or more specifically, a stream of bytes. It means that everything in the system from processes, files, directories, sockets, pipes, etc., is represented by a file descriptor abstracted over the virtual filesystem layer in the kernel. The virtual filesystem is an interface provided by the kernel.

The whole architecture of UNIX is a deep concept, so I won't be going further. I think I've covered all the basic topics. I haven't started writing the next part in the UNIX Basics series, so I don't know what it will be about yet, but be sure to keep an eye for that.

If you find any errors or mistakes, please comment down below, I'll be sure to correct it.


Editor guide
5krishna profile image

Good job mate πŸ™ŒπŸ™ŒπŸ™Œ