UNIX Operating System
Overview
UNIX, one of the most powerful operating systems is the father of Operating systems like Ubuntu, Solaris and POSIX. It was developed in the by Ken Thompson and Dennis Ritchie and has been under constant development ever since. It is basically a suite of programs that make the computer work. Thus, its major application lies in fields related to science, engineering, academia, etc.
What is UNIX Operating System?
UNIX operating system also referred to as UNICS or UNiplexed Information Computing System is known for its features of multitasking, flexibility, stability, etc. The hierarchical file structure in the UNIX operating system helps in indexed storage and easy retrieval.
The UNIX operating system that was developed in AT&T laboratories was first distributed in government and academic institutions due to its multitasking and multiuser abilities. This helped in ensuring its widespread use and applications. The operating system's power lay in its Kernel.
Universities, research laboratories, colleges, and big government entities all utilize UNIX. Many students and researchers use UNIX to learn to code and get experience with operating systems. UNIX is regarded as the first operating system to employ a full-screen editor, and modifying code online by several individuals becomes simple with UNIX.
Architecture of UNIX Operating System
The UNIX operating system is divided into 4 prominent layers that help define the interaction between the hardware and the user. As we move from layer 1 to layer 4, we move away from hardware towards the software. UNIX OS consists of a hardware layer, kernel layer, shell layer, and applications layer. These layers together create a multiuser, multitasking operating system. The following diagram shows a pictorial representation of the layers in the UNIX operating system.
-
Hardware Layer:
It contains the hardware-related information required for the functioning of the UNIX environment. -
Kernel Layer:
The core (commonly known as the heart) of the operating system. It is a software application that acts as the interface between the hardware and the user. The kernel is responsible for handling the major functionality of the Unix Operating System including process, memory, file, network, etc.
Functions of the Kernel Layer:- Ensures that all the system and user tasks are executed concurrently.
- Acts as a device manager helping processes gain access to peripheral devices connected to the computer with the help of device drivers .
- Manages memory using techniques like paging, swapping, and virtual storage.
-
Shell Layer:
The interface between the user and kernel. It is a program that interprets/translates commands typed into the terminal into a series of commands that can be sent to the shell. This script containing commands is called a shell script. The shell is what keeps a history of commands typed in by the user. To repeat a command previously typed, you can simply click the scroll-up key and you will get access to the older commands.UNIX uses multiple shells including Bourne Shell (sh), C shell (csh), Korn shell (ksh), etc. The initial shell that the user logs into is defined by the system administrator. The user can change the default shell by using the 'chsh' command.
-
Application Programs Layer:
The outermost layer that includes programs that are accessed by command on the command line. It executes external applications like word processors and graphic programs . Although the earlier Command line was the only way to access them, now GUI can also be used.
Types of Shell in UNIX
In UNIX, a program used to interpret commands sent by the user to the operating system is called a shell. In UNIX, users are free to select a shell of their choice. Given below are some commonly used shells that you should be aware of :
-
Bourne Shell:
The first shell used for the UNIX operating system, the Bourne Shell is also simply called the Shell. It is still the most widely used due to its high functionality. This is represented as sh. -
C Shell:
As the name suggests, the C shell in UNIX is used to allow users to write shell scripts using a syntax similar to the C language. It was developed to remove the limitations of the Bourne Shell. It is commonly known as csh. -
Korn Shell:
It was created by David Korn to address the drawbacks of Bourne and C shell, the Korn Shell. It merges all features in one package and provides developers with the ability to create new shell commands. It is also known as ksh.
Features of UNIX Operating System
-
Open Source:
Being open-source, the UNIX operating system is freely available to the community for use and customization. -
Multitasking:
The UNIX operating system allows you to launch several tasks or processes from the same terminal, with one running in the foreground and the other in the background. -
Multi-user:
Multiple users can access compute resources in a UNIX operating system. Different terminals can be used to log in by the user. This allows different jobs to share the resources of a command terminal. Time-sharing mechanisms are used where a scheduler allots time to different jobs based on a scheduling technique. -
Utilities:
Various types of tools are available on the UNIX operating system. These include grep, sed, awk, etc. These tools can be used in compilers, network applications, and remote services. -
Portability:
Because a large percentage of the UNIX operating system is written in the C language and only a tiny portion is coded for specific hardware, it ensures the transfer of code to any computer system. This makes the UNIX operating system highly portable. -
File Security and Protection:
UNIX is a multi-user which makes it more vulnerable to security threats. Thus, UNIX places importance on file security and protection. UNIX security measures include giving usernames and passwords, providing authentication, allowing file access permissions , and file encryption . -
Command Structure:
UNIX commands are straightforward to learn and use. Commands in UNIX are case-sensitive (i.e. UNIX treats lowercase and uppercase characters separately) and they are mostly written in lowercase. Example: cp, mv etc. -
Communication:
UNIX operating system supports communication methods using the write command, mail command, etc. -
Accounting:
UNIX maintains track of the jobs that the user creates. This function improves system performance by monitoring CPU use and verifying disk space. It allows you to keep track of how much disk space each user uses, and the disk space may be regulated by each other. You can set a distinct disk quota for each user. These accounting duties may be performed by the root user using different commands such as quota, df, du, and so on.
Learn in Detail- Features of UNIX OS
Advantages of UNIX Operating System
- Supports multiple users and multitasking:
Multiple users can access the UNIX Operating system. Programs work in parallel, thus supporting multitasking. - Free:
Being free and customizable, UNIX is a top choice for Operating Systems. - Portable:
Being created using the language, the UNIX operating system is highly portable and easy to use. - Less memory usage:
UNIX Operating system handles virtual memory more efficiently. It expands as more programs enter the main memory. The least amount of resources is utilized for the jobs. - Uniformity:
All data in UNIX operating system is stored in files, devices, and terminals. - Secure:
UNIX provides a safe and secure platform for multiple users. Each user is required to be authenticated to access the operating system. Files are protected from unauthorized use. Various permission levels are set for the users to prevent misuse of data. The OS is considered safe from viruses. Installation of an anti-virus is not necessary for it. - Ideal for web hosting:
Being secure and free, UNIX OS is an excellent choice for web hosting companies. - Modular:
Utilities in UNIX are modular, i.e. they divide a bigger problem into smaller ones. These modules are then united to work consistently throughout the system. - Presence of many variants:
Variants include Ubuntu, RedHat, etc. - Easy retrieval of files:
Due to the hierarchical file system, file access and retrieval seems to be easier. - Better performance and stable database access.
Disadvantages of UNIX Operating System
-
Not user-friendly:
A novice user finds it difficult to use UNIX. Because most UNIX work is done with commands in the CLI, beginners must memorize a variety of commands. -
Cryptic commands cause a high learning curve:
The majority of UNIX commands employ cryptic terminology. It is difficult for the average user to understand how commands operate. Some instructions employ unusual characters, making it difficult for inexperienced programmers to grasp them. If you type the erroneous character in the command, your system may begin doing unexpected tasks, which may include deleting or changing certain files. -
Poor documentation:
There is no proper UNIX documentation available. If the user encounters an issue, he must seek the advice of an expert, as obtaining online assistance from the documentation is difficult. -
Lack of software drivers:
Some software drivers are not accessible. -
Unattractive UI:
The UNIX user interface is not particularly appealing. -
No Games for UNIX:
As UNIX has fewer users, most gaming firms do not create games for it. There are extremely few games available on UNIX.
Conclusion
- UNIX operating system derives a lot of code from the C language.
- UNIX's first applications were in academic and government research and this helped in its widespread use.
- UNIX is open-source, free, and highly customizable.
- UNIX operating system is simple, transparent, and secure.
- Features like multitasking and multi-user increase its demand.
- It has 4 layers - hardware, kernel, shell, and application.
- UNIX has many variants but is not as widely used as Windows OS today as it lacks an appealing GUI.
- The commands are cryptic and can cause difficulty in understanding and learning for the user.