0% found this document useful (0 votes)
57 views5 pages

UNIX Assignment

Uploaded by

Patel Jay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views5 pages

UNIX Assignment

Uploaded by

Patel Jay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Atmanand Saraswati Science College

UNIX Assignment
Questions
Q - 1) List and explain features of UNIX.
Answer:
1. Multiuser system:
Unix provides multiple programs to run and compete for the attention of the
CPU.
This happens in 2 ways:
➢ Multiple users running multiple jobs
➢ Single user running multiple jobs
In UNIX, resources are actually shared between all the users, so-called a
multi-user system. For doing so, computer give a time slice (breaking unit of
time into several segments) to each user.
So, at any instant of time, only one user is served but the switching is so fast
that it gives an illusion that all the users are served simultaneously.
2. Multitask system:
A single user may run multiple tasks concurrently.
Example: Editing a file, printing another on the printer & sending email to a
person, and browsing the net too at the same time.
The Kernel is designed to handle user’s multiple needs.
The important thing here is that only one job can be seen running in the
foreground, the rest all seems to run in the background.
Users can switch between them, terminate/suspend any of the jobs.
3. Open source:
UNIX operating system is open source it means it is freely available to all and
is a community-based development project.
4. Portable:
This feature makes the UNIX work on different machines and platforms with
the easy transfer of code to any computer system.
5. Unix tools and utilities:
Unix has a kernel but the kernel alone can’t do much that could help the user.
So, we need to use the host of applications that usually come along with the
UNIX systems. The applications are quite diversified.
General-purpose tools, text manipulation utilities (called filters), compilers
and interpreters, networked programs, and system administration tools are all
included.
6. Command structure:
UNIX commands are easy to understand and simple to use. Example: "cp",
mv etc.
UNIX commands are case-sensitive and are entered in lower case.
7. File security and protection:
UNIX has different levels of security using assigning username and password
to individual users ensuring the authentication, at the level providing file
access permission like read, write and execute and lastly file encryption to
change the file into an unreadable format.

Q - 2) Explain architecture of UNIX.


Answer:

Layer-1: Hardware
This layer of UNIX consists of all hardware-related information in the UNIX
environment.
Layer-2: Kernel
The core of the operating system that's liable for maintaining the full functionality
is named the kernel. The kernel of UNIX runs on the particular machine hardware
and interacts with the hardware effectively.
It also works as a device manager and performs valuable functions for the
processes which require access to the peripheral devices connected to the
computer. The kernel controls these devices through device drivers.
The kernel also manages the memory. Processes are executed programs that have
owner's humans or systems who initiate their execution.
Layer-3: The Shell
The Shell is an interpreter that interprets the command submitted by the user at
the terminal, and calls the program you simply want.
It also keeps a history of the list of the commands you have typed in. If you need
to repeat a command you typed it, use the cursor keys to scroll up and down the
list or type history for a list of previous commands.
There are various commands like cat, mv, cat, grep, id, wc, and many more.
Layer-4: Application Programs Layer
It is the outermost layer that executes the given external applications. UNIX
distributions typically come with several useful applications programs as
standard.
For Example: emacs editor, Star Office, xv image viewer, g++ compiler etc.

Q - 3) Describe different file access permissions.


Answer:
File access permissions in UNIX are defined to three types of users as below:
1. Owner permissions
The owner's permissions determine what actions the owner of the file can
perform on the file.
2. Group permissions
The group's permissions determine what actions a user, who is a member
of the group that a file belongs to, can perform on the file.
3. Other (world) permissions
The permissions for others indicate what action all other users can perform
on the file.
Above listed users can have access of file in three access modes as defined below:
1. Read (r):
The read permission allows you to open and read the content of a file. But
you can't do any editing or modification in the file.
2. Write (w):
The write permission allows you to edit, remove or rename a file. For
instance, if a file is present in a directory, and write permission is set on the
file but not on the directory, then you can edit the content of the file but
can't remove, or rename it.
3. Execute (x):
In Unix type system, you can't run or execute a program unless execute
permission is set. But in Windows, there is no such permission available.
Q - 4) Explain file system architecture of UNIX.
Answer:

Root ( / ):
The top of the directory structure is called root. It is also called parent directory
as it contains all the subdirectories of the UNIX file system. It is represented by
using slash symbol in UNIX system.
/lib:
This directory contains all the information of system libraries functions and some
critical files such as kernel modules or device drivers. It also contains the system
calls that the compiler can include in a program.
/bin:
This directory contains the system's binary files and certain fundamental utilities.
It is the directory for admin-level commands such as ls or cp. The path (var)
always shows this directory in the list.
/dev:
It stands for "devices" and contains all the information about the device files used
in the UNIX system. These files do not occupy any space on the disk. It contains
al; information about hard disks, file representations of peripheral devices, floppy
disks, device information, and pseudo-devices.
/etc:
This directory and its subdirectories contain many of the UNIX configuration
files and system databases. These files have many text files that can be changed
according to the system's functionality. It also contains the information of your
login name and password.
/home:
This directory contains all the information of home directories for the users.
Whenever a user log in to the system, the UNIX system automatically places you
in a home directory.
/tmp:
This directory contains the information of all the temporary files created by UNIX
or by the user in the UNIX system.
/var:
The variable directory of a UNIX file system contains all the information of print
jobs and outgoing and incoming emails. The variable part of a file system may be
placed for files as database storage.
/usr:
This directory contains all the information related to the users in a UNIX system.
It means it contains all the user account such as user1, user2, and so on.

Q - 5) Explain types of shell in UNIX.


Answer:
SHELL is a program which provides the interface between the user and an
operating system. When the user logs in OS starts a shell for user.
Types of shell are as follow:
1. The C Shell
Bill Joy created it at the University of California at Berkeley. It incorporated
features such as aliases and command history. It includes helpful programming
features like built-in arithmetic and C-like expression syntax.
2. The Bourne Shell
It was written by Steve Bourne at AT&T Bell Labs. It is the original UNIX shell.
It is faster and more preferred. It lacks features for interactive use like the ability
to recall previous commands. It also lacks built-in arithmetic and logical
expression handling. It is default shell for Solaris OS.
3. The Korn Shell
It was written by David Korn at AT&T Bell Labs. It is a superset of the Bourne
shell. So it supports everything in the Bourne shell.It has interactive features. It
includes features like built-in arithmetic and C-like arrays, functions, and string-
manipulation facilities. It is faster than C shell. It is compatible with script written
for C shell.
4. Bourne-Again Shell
It is compatible to the Bourne shell. It includes features from Korn and Bourne
shell.

You might also like