0% found this document useful (0 votes)
121 views29 pages

Chapter 5

An operating system is a software interface between computer hardware and users that manages computer resources and allows users to run programs. Popular operating systems include Linux, Windows, UNIX, and DOS. The main functions of an operating system are memory management, processor management, file management, input/output management, and controlling peripheral devices. It serves as an interface for users to run applications in an organized way and allocates hardware resources like memory and processing time between different programs.

Uploaded by

Dipen Tamang
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)
121 views29 pages

Chapter 5

An operating system is a software interface between computer hardware and users that manages computer resources and allows users to run programs. Popular operating systems include Linux, Windows, UNIX, and DOS. The main functions of an operating system are memory management, processor management, file management, input/output management, and controlling peripheral devices. It serves as an interface for users to run applications in an organized way and allocates hardware resources like memory and processing time between different programs.

Uploaded by

Dipen Tamang
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/ 29

Introduction an Operating system

Table of Contents
Chapter five ........................................................................................................................................ 3
1 Operating systems overview ....................................................................................................... 3
1.1 Introduction to operating system :( DOS, WINDOWS, UNIX, LINUX) ............................ 3
1.1.1 Definition .................................................................................................................... 3
1.2 Function of Operating system ............................................................................................. 4
1.2.1 Major Functions of Operating System: ........................................................................ 4
1.3 Types of Operating system .................................................................................................. 6
1.3.1 Batch operating system ............................................................................................... 6
1.3.2 Time-sharing operating systems .................................................................................. 6
Homework .................................................................................................................................. 7
1.3.3 Distributed operating System ...................................................................................... 7
1.3.4 Network operating System .......................................................................................... 7
1.3.5 Single user operating system ....................................................................................... 8
1.3.6 Multi user operating system ........................................................................................ 8
1.3.7 Real time operating system ......................................................................................... 8
1.3.8 Multitasking operating system..................................................................................... 8
1.3.9 Multiprogramming ...................................................................................................... 9
Advantages ............................................................................................................................... 11
Disadvantages ........................................................................................................................... 11
2 Graphical user interface as Windows operating system ........................................................... 12
3 Character user interface as DOS ............................................................................................... 14
3.1 MS-DOS system files:....................................................................................................... 14
3.2 Internal and External MS-DOS Command ........................................................................ 14
4 UNIX operating system ............................................................................................................ 19
4.1 Features of UNIX Operating System: ............................................................................... 19
4.2 The structure of Unix OS Layers are as follows:............................................................... 21
4.2.1 Layer-1: Hardware - .................................................................................................. 21
4.2.2 Layer-2: Kernel - ....................................................................................................... 22
4.2.3 Layer-3: The Shell - .................................................................................................. 23
4.2.4 Types of Shell in UNIX System: ............................................................................... 23
4.2.5 Layer-4: Application Programs Layer - ..................................................................... 24
5 LINUX ...................................................................................................................................... 24
5.1 Evolution of Linux OS ...................................................................................................... 24
5.2 Structure Of Linux Operating System ............................................................................... 24
5.3 1) Kernel ........................................................................................................................... 25
5.4 2) System Libraries ........................................................................................................... 26
2078 1 upendra malla
Introduction an Operating system
5.5 3) System Tools ................................................................................................................ 27
5.6 4) Development Tools ....................................................................................................... 27
5.7 5) End User Tools ............................................................................................................. 27
5.8 Why use Linux? ................................................................................................................ 27
5.8.1 Free & Open Source Operating System ..................................................................... 28
5.8.2 It is secure ................................................................................................................. 28
5.8.3 Favorable choice of Developers ................................................................................ 28
5.8.4 A flexible operating system ....................................................................................... 29
5.9 Linux Distributions ........................................................................................................... 29
5.10 How does Linux work? ..................................................................................................... 29
5.11 How to use Linux? ............................................................................................................ 29

2078 1 upendra malla


Introduction an Operating system
Chapter five

5 Operating systems overview


5.1 Introduction to operating system :( DOS, WINDOWS, UNIX, LINUX)

The operating system is a system program that serves as an interface between the computing system
and the end-user. Operating systems create an environment where the user can run any programs or
communicate with software or applications in a comfortable and well-organized way.

Furthermore, an operating is a software program that manages and controls the execution of
application programs, software resources and computer hardware. It also helps manage the
software/hardware resource, such as file management, memory management, input/ output and many
peripheral devices like a disk drive, printers, etc. These are the popular operating system: Linux
OS, Windows OS, Mac OS, VMS, OS/400 etc

An Operating System (OS) is an interface between a computer user and computer hardware. An
operating system is a software which performs all the basic tasks like file management, memory
management, process management, handling input and output, and controlling peripheral devices
such as disk drives and printers.
Some popular Operating Systems include Linux Operating System, Windows Operating System,
VMS, OS/400, AIX, z/OS, etc

5.1.1 Definition
An operating system is a program that acts as an interface between the user and the computer
hardware and controls the execution of all kinds of programs.
Some popular Operating Systems include Linux Operating System, Windows Operating System,
2078 1 upendra malla
Introduction an Operating system
VMS, OS/400, AIX, z/OS, etc.

5.2 Function of Operating system


An operating system is software which performs all the basic tasks like file management, memory
management, process management, handling input and output, and controlling peripheral devices
such as disk drives and printers.

5.2.1 Major Functions of Operating System:


o Memory management: It manages both the primary and secondary memory such as RAM,
ROM, hard disk, pen drive, etc. It checks and decides the allocations and de-allocation of
memory space to different processes. When a user interacts with a system, the CPU is
supposed to read or write operations, in this case, OS decides the amount of memory to be
allocated for loading the program instructions and data into RAM. After this program is
terminated, the memory area is again free and is ready to be allocated to other programs by
the OS.
o Processor Management: It facilitates processor management, where it decides the order for
the processes to access the processor as well as decides the processing time to be allocated
for each process. Besides this, it monitors the status of processes, frees the processor when a
process is executed then allocates it to a new process.
o Device/ hardware management: The operating system also contains drivers to manage
devices. A driver is a type of translation software that allows the operating system to
communicate with devices, and there are different drivers for different devices as each
device speaks a different language.

2078 1 upendra malla


Introduction an Operating system

o Run software applications: It offers the environment to run or use software applications
developed to perform specific tasks, for example, Ms Word, Ms Excel, Photoshop, etc.
o Data management: It helps in data management by offering and displaying directories for
data management. You can view and manipulate files, folders, e.g., you can move, copy,
name, or rename, delete a file or a folder.
o Evaluates the system's health: It gives us an idea about the performance of the hardware of
the system. For example, you can see how busy the CPU is, how fast the data is retrieved
from the hard disk, etc.
o Provides user interface: It acts as an interface between the user and the hardware. It can be
a GUI where you can see and click elements on the screen to perform various tasks. It
enables you to communicate with the computer even without knowing the computer's
language.
o I/O management: It manages the input output devices and makes the I/O process smooth
and effective. For example, it receives the input provided by the user through an input
device and stores it in the main memory. Then it directs the CPU to process this input and
accordingly provides the output through an output device such as a monitor.
o Security: It has a security module to protect the data or information stored in the memories
of the computer against malware and unauthorized access. Thus, it not only manages your
data but also helps to protect it.
o Time Management: It helps CPU in time management. The Kernel OS keeps checking the
frequency of processes that requests CPU time. When two or more processes that are equally
important compete for the CPU time, then the CPU time is sliced into segments and
allocated to these processes in a round-robin fashion to prevent a single process from
monopolizing the CPU.
o Deadlock Prevention: Sometimes a resource that is supposed to be shared by two or more
processes is held by one process due to which the resource cannot continue. This situation is
known as deadlock. The OS does not let this situation arise by carefully distributing the
resources among the different processes.
o Interrupt Handling: OS also responds to interrupts, which are signals generated by a
program or a device to seek the attention of the CPU. The OS checks the priority of the
interrupt, and if it is more important than the currently running process, it stops the
execution of the current process and preserves this state of CPU then executes the requested
process. Thereafter the CPU returns to the same state where it was stopped.

2078 1 upendra malla


Introduction an Operating system

5.3 Types of Operating system

5.3.1 Batch operating system


The users of a batch operating system do not interact with the computer directly. Each user prepares
his job on an off-line device like punch cards and submits it to the computer operator. To speed up
processing, jobs with similar needs are batched together and run as a group. The programmers leave
their programs with the operator and the operator then sorts the programs with similar requirements
into batches.
The problems with Batch Systems are as follows −

 Lack of interaction between the user and the job.


 CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU.
 Difficult to provide the desired priority.

5.3.2 Time-sharing operating systems


Time-sharing is a technique which enables many people, located at various terminals, to use a
particular computer system at the same time. Time-sharing or multitasking is a logical extension of
multiprogramming. Processor's time which is shared among multiple users simultaneously is
termed as time-sharing.
The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is
that in case of Multiprogrammed batch systems, the objective is to maximize processor use,
whereas in Time-Sharing Systems, the objective is to minimize response time.
Multiple jobs are executed by the CPU by switching between them, but the switches occur so
frequently. Thus, the user can receive an immediate response. For example, in a transaction
processing, the processor executes each user program in a short burst or quantum of computation.
That is, if n users are present, then each user can get a time quantum. When the user submits the
command, the response time is in few seconds at most.
The operating system uses CPU scheduling and multiprogramming to provide each user with a
small portion of a time. Computer systems that were designed primarily as batch systems have been
modified to time-sharing systems. ABNEPAQL

Advantages of Timesharing operating systems are as follows −

 Provides the advantage of quick response.


 Avoids duplication of software.
 Reduces CPU idle time.
Disadvantages of Time-sharing operating systems are as follows −

 Problem of reliability.
 Question of security and integrity of user programs and data.
2078 1 upendra malla
Introduction an Operating system
 Problem of data communication.

Homework
1. What is an operating system? List the function of operating system.
2. What is batch operating system? Write example of batch operating system.
3. What is time sharing operating system?

5.3.3 Distributed operating System


Distributed systems use multiple central processors to serve multiple real-time applications and
multiple users. Data processing jobs are distributed among the processors accordingly.
The processors communicate with one another through various communication lines (such as high-
speed buses or telephone lines). These are referred as loosely coupled systems or distributed
systems. Processors in a distributed system may vary in size and function. These processors are
referred as sites, nodes, computers, and so on.
The advantages of distributed systems are as follows −

 With resource sharing facility, a user at one site may be able to use the resources available at
another.
 Speedup the exchange of data with one another via electronic mail.
 If one site fails in a distributed system, the remaining sites can potentially continue
operating.
 Better service to the customers.
 Reduction of the load on the host computer.
 Reduction of delays in data processing.

5.3.4 Network operating System


A Network Operating System runs on a server and provides the server the capability to manage
data, users, groups, security, applications, and other networking functions. The primary purpose of
the network operating system is to allow shared file and printer access among multiple computers
in a network, typically a local area network (LAN), a private network or to other networks.
Examples of network operating systems include Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.
The advantages of network operating systems are as follows −

 Centralized servers are highly stable.


 Security is server managed.
 Upgrades to new technologies and hardware can be easily integrated into the system.
 Remote access to servers is possible from different locations and types of systems.
The disadvantages of network operating systems are as follows −

 High cost of buying and running a server.


 Dependency on a central location for most operations.
 Regular maintenance and updates are required.

2078 1 upendra malla


Introduction an Operating system
5.3.5 Single user operating system

5.3.6 Multi user operating system

5.3.7 Real time operating system


A real-time system is defined as a data processing system in which the time interval required to
process and respond to inputs is so small that it controls the environment. The time taken by the
system to respond to an input and display of required updated information is termed as
the response time. So in this method, the response time is very less as compared to online
processing.
Real-time systems are used when there are rigid time requirements on the operation of a processor
or the flow of data and real-time systems can be used as a control device in a dedicated application.
A real-time operating system must have well-defined, fixed time constraints, otherwise the system
will fail. For example, Scientific experiments, medical imaging systems, industrial control systems,
weapon systems, robots, air traffic control systems, etc.
There are two types of real-time operating systems.

5.3.7.1 Hard real-time systems


Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems,
secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual
memory is almost never found.

5.3.7.2 Soft real-time systems


Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks and
retains the priority until it completes. Soft real-time systems have limited utility than hard real-time
systems. For example, multimedia, virtual reality, Advanced Scientific Projects like undersea
exploration and planetary rovers, etc.

5.3.8 Multitasking operating system


Multitasking is when multiple jobs are executed by the CPU simultaneously by switching between
them. Switches occur so frequently that the users may interact with each program while it is
running. An OS does the following activities related to multitasking −
 The user gives instructions to the operating system or to a program directly, and receives an
immediate response.
 The OS handles multitasking in the way that it can handle multiple operations/executes
multiple programs at a time.
 Multitasking Operating Systems are also known as Time-sharing systems.
 These Operating Systems were developed to provide interactive use of a computer system at
a reasonable cost.
 A time-shared operating system uses the concept of CPU scheduling and multiprogramming
to provide each user with a small portion of a time-shared CPU.
 Each user has at least one separate program in memory.

2078 1 upendra malla


Introduction an Operating system

 A program that is loaded into memory and is executing is commonly referred to as


a process.
 When a process executes, it typically executes for only a very short time before it either
finishes or needs to perform I/O.
 Since interactive I/O typically runs at slower speeds, it may take a long time to complete.
During this time, a CPU can be utilized by another process.
 The operating system allows the users to share the computer simultaneously. Since each
action or command in a time-shared system tends to be short, only a little CPU time is
needed for each user.
 As the system switches CPU rapidly from one user/program to the next, each user is given
the impression that he/she has his/her own CPU, whereas actually one CPU is being shared
among many users.

5.3.9 Multiprogramming
Sharing the processor, when two or more programs reside in memory at the same time, is referred
as multiprogramming. Multiprogramming assumes a single shared processor. Multiprogramming
increases CPU utilization by organizing jobs so that the CPU always has one to execute. Example:
windows, Mac, linux etc.
The following figure shows the memory layout for a multiprogramming system.

An OS does the following activities related to multiprogramming.


 The operating system keeps several jobs in memory at a time.
 This set of jobs is a subset of the jobs kept in the job pool.
2078 1 upendra malla
Introduction an Operating system
 The operating system picks and begins to execute one of the jobs in the memory.
 Multiprogramming operating systems monitor the state of all active programs and system
resources using memory management programs to ensures that the CPU is never idle,
unless there are no jobs to process.

5.3.10 Multithreading
A program in execution in known as processes. A process can be further divided into multiple sub
processers. These sub processors are known as threads. A multi-threading OS can divide process into
threads and execute those threads. This increases operating speed but also increases the complexity.
For example: UNIX, server edition or Linux and windows.

2078 1 upendra malla


Introduction an Operating system

Advantages

 High and efficient CPU utilization.


 User feels that many programs are allotted CPU almost simultaneously.

Disadvantages

 CPU scheduling is required.


 To accommodate many jobs in memory, memory management is required

In other sides, we are categories into two of Operating system according to the interface and user
frequently. They are:
a) Graphical user interface
b) Character user interface

2078 1 upendra malla


Introduction an Operating system

6 Graphical user interface as Windows operating system


The term ‘user interface’ originated in the engineering environment in the late 1970s. GUI
stands for graphical user interface which means to an interface that allows one to interact
with electronic devices like computers and tablets through graphic elements. It uses icons,
menus and other graphical representation to display information, as opposed to text based
command. The graphic elements enable users to give commands to the computer and select
functions by mouse or other input devices. The program which run under a GUI has a
specific set of graphic elements os that after learning a specific interface, a user can use
these programs without learning new commands. Xerox 8010 information system was the
first GUI centric computer operating model.
Basic some components of GUI
a. Pointer
b. Pointing devices
c. Icons
d. Menu
e. Desktop
f. Window
g. Taskbar
h. Screen severs etc.
Windows operating system is more popular graphical operating system in now days. So, some
features of Windows operating system.
a. Start button
b. Pointer/curser
c. Window
d. Task bar
e. Control panel
f. Specific folder
g. Folder / file
Folder
Name
Icon/ image
Size
Rename
Delete
Sub folder
Date
Compressive /zip file
File
Name
Extension file (last name) program file name
Program icon
Size
Rename
Delete
Date
Compressive /zip file
How to create file and folder?

h. Browser
i. Word processing
j. Windows security
k. Firewall
2078 1 upendra malla
Introduction an Operating system
l. Desktop
m. Disk defragment / disk clean up
i) Working in desktop application and window environment
ii) Managing filing and folders with file explorer
iii) Installing and removing other software
iv) Manage passwords privacy levels
v) Use of control panel, system tools and accessories.

2078 1 upendra malla


Introduction an Operating system

7 Character user interface as DOS


The term ‘character interface’ means command base operating system which disk related
operating system. CUI stands for command user interface which means to an interface that
has use only one character or command on the screen. It cannot allow any one graphic
element. It uses the text based command. It is necessary less storage capacity and fast
execution. Some example of Linux, DOS and Unix etc. are best example of CUI.
How to open the DOS?
Step1 :- go to start button
Step2 :- click on search and type the CMD or command
Step3 :- double click on CMD file
Then will appear the disk operating system.
Or
Step1 :- press win key + r then open the run command
Step2 :- type cmd or command
Step3 :- Click on ok
Step4 :- Then will appear the disk operating system.

7.1 MS-DOS system files:


io.sys :
Basic input and output devices….manage
msdos.sys,
to create about Microsoft disk operating environment in computer.
config.sys
configuration file
command.com,
all command or instruction code on command.com library
autoexec.bat
notepad
word
datetime

7.2 Internal and External MS-DOS Command


Basic commands are given below :-

1.CLS
To clear the screen.
Syntax:
[drive name]/cls
Example:
C:\desktop\cls

2.DIR
To display the all directories.
Syntax:
[drive name]:\ dir
Example:
C:\dir
2078 1 upendra malla
Introduction an Operating system

3. MD
To make a directory
Syntax:
[drive name]:\MD [directory name]
Example
C:\MD Himal

4. CD
To change the directory location
Syntax:
[Drive name]:\cd [drive name]
Example :
C:\cd D:

5. Copy con
To create a new file.
Syntax:
[drive name]:\ copy con [file name]
Example:
C:\ copy con dinesh.txt
For saving file “CTRL + z
6. Type
To read the information in a file.
Syntax:
[drive name]:\ type [file name]
Example:
C:\type dinesh.txt

7. Format
To format the any selected drive.
Syntax:
[drive name]:\ format [drive name]
Example:
C:\ format d:
8. Del
To delete the selected file or directory
Syntax:
[drive name]:\ del [file name]

Example:
C:\ del dinesh.txt
9. ATTRIB
10. TREE
11. XCOPY
12. EXIT
13. VOL

ACALC APPEND ASSIGN ATTRIB BACKUP BASIC,


BASICA and GW-BASIC BREAK CALL CHCP CHDIR
CHKDSK CHOICE COMMAND COMP COPY CTTY
2078 1 upendra malla
Introduction an Operating system
DATE DEBUG DEFRAG DEL or ERASE DELTREE
DISKCOMP DISKCOPY DOSKEY DRVLOCK DYNALOAD ECHO
EDIT EDLIN EJECT EMM386 EXE2BIN EXIT
FASTOPEN FC FDISK FIND FOR FORMAT
GOTO GRAFTABL GRAPHICS HELP INTERLNK INTERSVR
JOIN LABEL MKDIR or MD MODE MORE
MOVE PATH RMDIR or RD SCANDISK SYS
TIME TREE UNDELETE UNFORMAT VER
VOL XCOPY

http://www.ordiecole.com/html/ms-dos_commands.pdf

7.2.1.1 Internal MS-DOS Command

The syntax for some frequently used internal commands follows.

TIME
Displays current time and allows it to be changed.
Syntax:
TIME

DATE
Displays current date and allows it to be changed.
Syntax:
DATE

CLS
Clears the screen.
Syntax:
CLS

DIR
Shows directory information of a diskette: name, size, and the date and time stamp of files.
Syntax:
DIR [d:][path]
Optional switches:
/p Display dir info and pauses display when the screen is full
/w Display names and extensions only in five columns

To display a file directory listing for D:\DATA\LETTER\ANNUAL from different current


directories:
D:\DATA\LETTER\ANNUAL> DIR
D:\DATA> DIR LETTER\ANNUAL
C:\WINDOWS> DIR D:\DATA\LETTER\ANNUAL

COPY
Copies a file. Name of copy may be the same as original, or different. Syntax:
COPY [d:][path][name.ext] [d:][path][name.ext]
Optional switches:
/v Verify, copies the file and compares it with the original
2078 1 upendra malla
Introduction an Operating system
/b Binary file

To copy a file from D:\BATCH to the root of A: drive


A:\> COPY D:\BATCH\CL.BAT (from A: drive)
D:\BATCH> COPY CL.BAT A:\ (from D:\BATCH)
To copy a file from the root of C: to A: drive and change its name
A:\> COPY C:\MSDOS.SYS MSDOSSYS.BAK (from A:)
C:\> COPY MSDOS.SYS A:\MSDOSSYS.BAK (from the root of C:)
To copy all of the files from the root of A: to D:\CCV\ENGCOMP
A:\> COPY *.* D:\CCV\ENGCOMP (from A:)
D:\CCV\ENGCOMP> COPY *.* A:\ (from D:\CCV\ENGCOMP)

TYPE
Displays the contents of a file.
Syntax:
TYPE [d:][path][name.ext]

To display the contents of the file MY.LET to the screen


A:\> TYPE MY.LET

DEL
Deletes a file from disk.
Syntax:
DEL [d:][path][name.ext]

To delete one file:


A:\> DEL A:\MY.LET
To del all files in current directory
A:\> DEL *.*

REN
Renames a file.
Syntax:
REN [d:][path][name.ext] [d:][path][newname.ext]

To change the name of the file D:\LET\ANNUAL\99.DOC to 1999.DOC


D:\LET> REN ANNUAL\99.DOC 1999.DOC (from D:\LET)
D:\DATA> REN \LET\ANNUAL\99.DOC 1999.DOC (from D:\DATA)
C:\WINDOWS> REN D:\LET\ANNUAL\99.DOC 1999.DOC (from C:\WINDOWS)

MD
Makes (creates) a new directory.
Syntax:
MD [d:][path][dirname]

To create a directory named HERMIT in the root of D: drive


D:\> MD HERMIT (from D:\)
C:\> MD D:\HERMIT (from C:\)

RD
Removes an existing directory (directory must be empty).
Syntax:
RD [d:][path][dirname]
2078 1 upendra malla
Introduction an Operating system

To remove the HERMIT sub-directory:


D:\> RD HERMIT (from D:\)
C:\> RD D:\HERMIT (from C:\)

CD
Changes the current directory.
Syntax:
CD [path][dirname]

To make D:\HERMIT the current directory


D:\> CD HERMIT (from D:\)
D:\DATA> CD \HERMIT (from D:\DATA)
D:\DATA\SOURCE> CD \HERMIT (from D:\DATA\SOURCE)
D:\DATA\SOURCE> CD .. (from D:\DATA\SOURCE)

2078 1 upendra malla


Introduction an Operating system

8 UNIX operating system

UNIX is a powerful Operating System initially developed by Ken Thompson, Dennis Ritchie at
AT&T Bell laboratories in 1970. It is prevalent among scientific, engineering, and academic
institutions due to its most appreciative features like multitasking, flexibility, and many more. In
UNIX, the file system is a hierarchical structure of files and directories where users can store and
retrieve information using the files.

8.1 Features of UNIX Operating System:

Let's discuss the features of UNIX OS one by one in detail.

2078 1 upendra malla


Introduction an 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.

2078 1 upendra malla


Introduction an Operating system
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.

Accounting: UNIX keeps an account of jobs created by the user. This feature enhances the system
performance in terms of CPU monitoring and disk space checking. It allows you to keep an account
of disk space used by each user, and the disk space can be limited by each other. You can assign
every user a different disk quota. The root user can perform these accounting tasks using various
commands such as quota, df, du, etc.

UNIX Tools and Utilities: UNIX system provides various types of tools and utilities facilities such
as UNIX grep, sed and awk, etc. Some of the general-purpose tools are compilers, interpreters,
network applications, etc. It also includes various server programs which provide remote and
administration services.

8.2 The structure of Unix OS Layers are as follows:

While working with UNIX OS, several layers of this system provide interaction between the pc
hardware and the user. Following is the description of each and every layer structure in UNIX
system:

8.2.1 Layer-1: Hardware -

This layer of UNIX consists of all hardware-related information in the UNIX environment.

2078 1 upendra malla


Introduction an Operating system

8.2.2 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.

The system must provide all processes with access to an adequate amount of memory, and a few
processes require a lot of it. To make effective use of main memory and to allocate a sufficient
amount of memory to every process. It uses essential techniques like paging, swapping, and virtual
storage.

2078 1 upendra malla


Introduction an Operating system

8.2.3 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.

8.2.4 Types of Shell in UNIX System:

o Bourne Shell: This Shell is simply called the Shell. It was the first Shell for UNIX OS. It is
still the most widely available Shell on a UNIX system.
o C Shell: The C shell is another popular shell commonly available on a UNIX system. The C
shell was developed by the University of California at Berkeley and removed some of the
shortcomings of the Bourne shell.
o Korn Shell: This Shell was created by David Korn to address the Bourne Shell's user-
interaction issues and to deal with the shortcomings of the C shell's scripting quirks.

2078 1 upendra malla


Introduction an Operating system

8.2.5 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, StarOffice,
xv image viewer, g++ compiler etc

9 LINUX

Linux is an open-source operating system like other operating systems such as Microsoft Windows,
Apple Mac OS, iOS, Google android, etc. An operating system is a software that enables the
communication between computer hardware and software. It conveys input to get processed by the
processor and brings output to the hardware to display it. This is the basic function of an operating
system. Although it performs many other important tasks, let's not talk about that.

Linux is around us since the mid-90s. It can be used from wristwatches to supercomputers. It is
everywhere in our phones, laptops, PCs, cars and even in refrigerators. It is very much famous
among developers and normal computer users.

9.1 Evolution of Linux OS

The Linux OS was developed by Linus Torvalds in 1991, which sprouted as an idea to improve the
UNIX OS. He suggested improvements but was rejected by UNIX designers. Therefore, he thought
of launching an OS, designed in a way that could be modified by its users.

Nowadays, Linux is the fastest-growing OS. It is used from phones to supercomputers by almost all
major hardware devices.

Java Try Catch

9.2 Structure Of Linux Operating System

An operating system is a collection of software, each designed for a specific function.

Linux OS has following components:

2078 1 upendra malla


Introduction an Operating system

9.3 1) Kernel

Linux kernel is the core part of the operating system. It establishes communication between devices
and software. Moreover, it manages system resources. It has four responsibilities:

2078 1 upendra malla


Introduction an Operating system

o device management: A system has many devices connected to it like CPU, a memory
device, sound cards, graphic cards, etc. A kernel stores all the data related to all the devices
in the device driver (without this kernel won't be able to control the devices). Thus kernel
knows what a device can do and how to manipulate it to bring out the best performance. It
also manages communication between all the devices. The kernel has certain rules that have
to be followed by all the devices.
o Memory management: Another function that kernel has to manage is the memory
management. The kernel keeps track of used and unused memory and makes sure that
processes shouldn't manipulate data of each other using virtual memory addresses.
o Process management: In the process, management kernel assigns enough time and gives
priorities to processes before handling CPU to other processes. It also deals with security
and ownership information.
o Handling system calls: Handling system calls means a programmer can write a query or ask
the kernel to perform a task.

9.4 2) System Libraries

System libraries are special programs that help in accessing the kernel's features. A kernel has to be
triggered to perform a task, and this triggering is done by the applications. But applications must
know how to place a system call because each kernel has a different set of system calls.
Programmers have developed a standard library of procedures to communicate with the kernel. Each
2078 1 upendra malla
Introduction an Operating system
operating system supports these standards, and then these are transferred to system calls for that
operating system.

The most well-known system library for Linux is Glibc (GNU C library).

9.5 3) System Tools

Linux OS has a set of utility tools, which are usually simple commands. It is a software which GNU
project has written and publish under their open source license so that software is freely available to
everyone.

With the help of commands, you can access your files, edit and manipulate data in your directories
or files, change the location of files, or anything.

9.6 4) Development Tools

With the above three components, your OS is running and working. But to update your system, you
have additional tools and libraries. These additional tools and libraries are written by the
programmers and are called toolchain. A toolchain is a vital development tool used by the
developers to produce a working application.

9.7 5) End User Tools

These end tools make a system unique for a user. End tools are not required for the operating system
but are necessary for a user.

Some examples of end tools are graphic design tools, office suites, browsers, multimedia players,
etc.

9.8 Why use Linux?

This is one of the most asked questions about Linux systems. Why do we use a different and bit
complex operating system, if we have a simple operating system like Windows? So there are
various features of Linux systems that make it completely different and one of the most used
operating systems. Linux may be a perfect operating system if you want to get rid of viruses,
malware, slowdowns, crashes, costly repairs, and many more. Further, it provides
various advantages over other operating systems, and we don't have to pay for it. Let's have a look at
some of its special features that will attract you to switch your operating system.

2078 1 upendra malla


Introduction an Operating system

9.8.1 Free & Open Source Operating System

Most OS come in a compiled format means the main source code has run through a program called a
compiler that translates the source code into a language that is known to the computer.

Modifying this compiled code is a tough job.

On the other hand, open-source is completely different. The source code is included with the
compiled version and allows modification by anyone having some knowledge. It gives us the
freedom to run the program, freedom to change the code according to our use, freedom to
redistribute its copies, and freedom to distribute copies, which are modified by us.

In short, Linux is an operating system that is "for the people, by the people."

And we can dive in Linux without paying any cost. We can install it on Multiple machines without
paying any cost.

9.8.2 It is secure

Linux supports various security options that will save you from viruses, malware, slowdowns,
crashes. Further, it will keep your data protected. Its security feature is the main reason that it is the
most favorable option for developers. It is not completely safe, but it is less vulnerable than others.
Each application needs to authorize by the admin user. The virus cannot be executed until the
administrator provides the access password. Linux systems do not require any antivirus program.

9.8.3 Favorable choice of Developers

Linux is suitable for the developers, as it supports almost all of the most used programming
languages such as C/C++, Java, Python, Ruby, and more. Further, it facilitates with a vast range of
useful applications for development.

Developers find that the Linux terminal is much better than the Windows command line, So, they
prefer terminal over the Windows command line. The package manager on Linux system helps
programmers to understand how things are done. Bash scripting is also a functional feature for the
programmers. Also, the SSH support helps to manage the servers quickly.
2078 1 upendra malla
Introduction an Operating system

9.8.4 A flexible operating system

Linux is a flexible OS, as, it can be used for desktop applications, embedded systems, and server
applications. It can be used from wristwatches to supercomputers. It is everywhere in our phones,
laptops, PCs, cars and even in refrigerators. Further, it supports various customization options.

9.9 Linux Distributions

Many agencies modified the Linux operating system and makes their Linux distributions. There are
many Linux distributions available in the market. It provides a different flavor of the Linux
operating system to the users. We can choose any distribution according to our needs. Some popular
distros are Ubuntu, Fedora, Debian, Linux Mint, Arch Linux, and many more.

For the beginners, Ubuntu and Linux Mint are considered useful and, for the proficient developer,
Debian and Fedora would be a good choice. To Get a list of distributions, visit Linux Distributions.

9.10 How does Linux work?

Linux is a UNIX-like operating system, but it supports a range of hardware devices from phones to
supercomputers. Every Linux-based operating system has the Linux kernel and set of software
packages to manage hardware resources.

Also, Linux OS includes some core GNU tools to provide a way to manage the kernel resources,
install software, configure the security setting and performance, and many more. All these tools are
packaged together to make a functional operating system.

9.11 How to use Linux?

We can use Linux through an interactive user interface as well as from the terminal (Command Line
Interface). Different distributions have a slightly different user interface but almost all the commands
will have the same behavior for all the distributions. To run Linux from the terminal, press the
"CTRL+ALT+T" keys. And, to explore its functionality, press the application button given on the
left down corner of your desktop.

2078 1 upendra malla

You might also like