Q1. Describe The Layered Architecture of UNIX
Q1. Describe The Layered Architecture of UNIX
Q2. UNIX follows a hierarchical file system. Discuss the important directories and their
significance.
1 /
This is the root directory which should contain only the directories needed at the top level of
the file structure
2 /bin
This is where the executable files are located. These files are available to all users
3 /dev
4 /etc
Contains Supervisor directory commands, configuration files, disk configuration files, valid
user lists, groups, ethernet, hosts, where to send critical messages
5 /lib
6 /boot
Contains files for booting the system
7 /home
8 /mnt
9 /proc
Contains all processes marked as a file by process number or other information that is
dynamic to the system
10 /tmp
11 /usr
Used for miscellaneous purposes, and can be used by many users. Includes administrative
commands, shared files, library files, and others
12 /var
Typically contains variable-length files such as log and print files and any other type of file
that may contain a variable amount of data
13 /sbin
14 /kernel
Q3. Define what do understand by Process? Explain various states in which a process goes
through during its life cycle with the help of Process State Transition Diagram.
An instance of a running program is called a process. Every time you run a shell command, a
program is run, and a process is created for it. Each process in Linux has a process id (PID)
and it is associated with a particular user and group account.
Q4. Discuss about the different types of files available in UNIX. Give example of each type.
File type Description
Block or character Represent device files such as hard drives, monitors, etc.
special files Example: /dev/printer
Point or mirror other files
Link files Example: For making a link file for ayush.txt we can make a
link file ayush
Provide inter-process communication
Socket files Example: nodejs.c makes a socket connection
An inode is a data structure that stores various information about a file in Linux, such as the
access mode (read, write, execute permissions), ownership, file type, file size, group,
number of links, etc. Each inode is identified by an integer number. An inode is assigned to a
file when it is created.