CA2 Unix

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Dinabandhu Andrews Institute of Technology

and Management

Paper Name- : Unix and shell programing


Paper Code- BCAC601

NAME: Sayan Bose


University Roll No. : 15401220049
Class Roll No.: 40
Stream: BCA
Semester: 6th
Session: 2020-23

Dinabandhu Andrews Institute of Technology and Management


[ Affiliated to Maulana Abul Kalam Azad University of Technology, West Bengal ]
Block-S, 1/406A, Baishnabghata, Near Satyajit Ray Park, Patuli, Kolkata – 700094.
Operating System
An operating system (OS) is system software that manages computer hardware and software resources, and
provides common services for computer programs.

Types Of Operating System


1. Batch Operating System – This type of operating system does not interact with the computer directly.
There is an operator which takes similar jobs having the same requirement and group them into batches. It
is the responsibility of the operator to sort jobs with similar needs.
2. Time-Sharing Operating Systems – Each task is given some time to execute so that all the tasks work
smoothly. Each user gets the time of CPU as they use a single system. These systems are also known as
Multitasking Systems. The task can be from a single user or different users also. The time that each task gets
to execute is called quantum. After this time interval is over OS switches over to the next task.
3. Distributed Operating System – These types of the operating system is a recent advancement in the world
of computer technology and are being widely accepted all over the world and, that too, with a great pace.
Various autonomous interconnected computers communicate with each other using a shared communication
network. Independent systems possess their own memory unit and CPU. These are referred to as loosely
coupled systems or distributed systems. These system’s processors differ in size and function. The major
benefit of working with these types of the operating system is that it is always possible that one user can
access the files or software which are not actually present on his system but some other system connected
within this network i.e., remote access is enabled within the devices connected in that network.
4. Network Operating System – These systems run on a server and provide the capability to manage data,
users, groups, security, applications, and other networking functions. These types of operating systems allow
shared access of files, printers, security, applications, and other networking functions over a small private
network. One more important aspect of Network Operating Systems is that all the users are well aware of
the underlying configuration, of all other users within the network, their individual connections, etc. and
that’s why these computers are popularly known as tightly coupled systems.
5. Real-Time Operating System – These types of OSs serve real-time systems. The time interval required to
process and respond to inputs is very small. This time interval is called response time.

Unix Operating System


The Unix operating system is a set of programs that act as a link between the computer and the user.

Unix was originally developed in 1969 by a group of AT&T employees Ken Thompson, Dennis Ritchie,
Douglas McIlroy, and Joe Ossanna at Bell Labs.
Feature Of Unix Operating System
Multitasking: A UNIX operating system is a multitasking operating system that allows you to
initiate more than one task from the same terminal so that one task is performed as a foreground and
the other task as a background process.

Multi-user: UNIX operating system supports more than one user to access computer resources like
main memory, hard disk, tape drives, etc. Multiple users can log on to the system from different
terminals and run different jobs that share the resources of a command terminal. It deals with the
principle of time-sharing. Time-sharing is done by a scheduler that divides the CPU time into several
segments also called a time slice, and each segment is assigned to each user on a scheduled basis.
This time slice is tiny. When this time is expired, it passes control to the following user on the
system. Each user executes their set of instructions within their time slice.

Portability: This feature makes the UNIX work on different machines and platforms with the easy
transfer of code to any computer system. Since a significant portion of UNIX is written in C
language, and only a tiny portion is coded in assembly language for specific hardware.

File Security and Protection: Being a multi-user system, UNIX makes special consideration for file
and system security. UNIX has different levels of security using assigning username and password to
individual users ensuring the authentication, at the level providing file access permission viz. read,
write and execute and lastly file encryption to change the file into an unreadable format.

Command Structure: UNIX commands are easy to understand and simple to use. Example: "cp",
mv etc. While working in the UNIX environment, the UNIX commands are case-sensitive and are
entered in lower case.

Communication: In UNIX, communication is an excellent feature that enables the user to


communicate worldwide. It supports various communication facilities provided using the write
command, mail command, talk command, etc.

Open Source: UNIX operating system is open source it means it is freely available to all and is a
community-based development project
Unix Architecture

• Kernel − The kernel is the heart of the operating system. It interacts with the hardware and most of
the tasks like memory management, task scheduling and file management.

• Shell − The shell is the utility that processes your requests. When you type in a command at your
terminal, the shell interprets the command and calls the program that you want. The shell uses
standard syntax for all commands. C Shell, Bourne Shell and Korn Shell are the most famous shells
which are available with most of the Unix variants.

• Commands and Utilities − There are various commands and utilities which you can make use of in
your day to day activities. cp, mv, cat and grep, etc. are few examples of commands and utilities.
There are over 250 standard commands plus numerous others provided through 3 rd party software.
All the commands come along with various options.

• Files and Directories − All the data of Unix is organized into files. All files are then organized into
directories. These directories are further organized into a tree-like structure called the filesystem.
Types Of Kernel
• Monolithic Kernel – In Monolithic Kernel user services and kernel services are implemented under
the same address space.
• Micro Kernel- In Micro Kernel user services and kernel services are implemented under the
different address space.

Process: A process is a running program that serves as the foundation for all computation

Process Control Block:


Process Control Block is a data structure that contains information of the process related to it.
Process State
This specifies the process state i.e. new, ready, running, waiting or terminated.

Process Number
This shows the number of the particular process.

Program Counter
This contains the address of the next instruction that needs to be executed in the process.

Registers
This specifies the registers that are used by the process. They may include accumulators, index
registers, stack pointers, general purpose registers etc.

List of Open Files


These are the different files that are associated with the process

CPU Scheduling Information


The process priority, pointers to scheduling queues etc. is the CPU scheduling information that is
contained in the PCB. This may also include any other scheduling parameters.

Memory Management Information


The memory management information includes the page tables or the segment tables depending on
the memory system used. It also contains the value of the base registers, limit registers etc.

I/O Status Information


This information includes the list of I/O devices used by the process, the list of files etc.

Accounting information
The time limits, account numbers, amount of CPU used, process numbers etc. are all a part of the
PCB accounting information.

Location of the Process Control Block


The process control block is kept in a memory area that is protected from the normal user access.
This is done because it contains important process information. Some of the operating systems place
the PCB at the beginning of the kernel stack for the process as it is a safe location

You might also like