0% found this document useful (0 votes)
2K views19 pages

Linux Notes

Linux is an operating system consisting of application software, system software, and a kernel. The kernel serves as the core interface between software and hardware, controlling processor and memory access. Some key components of Linux include the kernel, application software like MS Word and Excel, and system software that handles internal computer workings. Linux evolved from earlier operating systems and is now widely used due to being free and easily modifiable. It provides important functions like interfacing with users and devices, booting the computer, managing memory and files, and allowing multitasking.

Uploaded by

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

Linux Notes

Linux is an operating system consisting of application software, system software, and a kernel. The kernel serves as the core interface between software and hardware, controlling processor and memory access. Some key components of Linux include the kernel, application software like MS Word and Excel, and system software that handles internal computer workings. Linux evolved from earlier operating systems and is now widely used due to being free and easily modifiable. It provides important functions like interfacing with users and devices, booting the computer, managing memory and files, and allowing multitasking.

Uploaded by

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

LINUX

OPERATING SYSTEM:
It is a package of Application software, system software and Kernal.

Operating system is a system program that serves as interface between computing system
and end user.
Ex: Windows, ubuntu, MAC OS
Application software:
The term “application software” refers to software that performs specific functions for a
user. When a user interacts directly with a piece of software, it is called application
software.
Ex: MS WORD, EXCEL etc.
System software:
system software is a set of programs that handles all the basic internal working of a computer.
Moreover, it executes and controls all the working of different peripheral devices and other basic
tasks and software.
Ex: compilers, device drivers etc.

Kernal:
It serves as the core of an operating system and the interface between software and hardware.
This means that the kernel is in constant use and is a key component of an operating system.

The kernel not only serves as the core of the system but is also a program that controls all
processor and memory access. It is responsible for the most important drivers and has direct
access to the hardware. It’s the basis for interactions between hardware and software and
manages their resources as efficiently as possible.

EG : Linux
EVOLUTION OF OPERATING SYSTEM
The first operating system used for real work was GM-NAA I/O, produced in 1956
by General Motors' Research division for its IBM 704.

Digital Equipment Corporation created several operating systems for its 16-bit PDP-
11 machines, including the simple RT-11 system, the time-sharing RSTS operating systems,
and the RSX-11 family of real-time operating systems, as well as the VMS system for the 32-
bit VAX machines.

The Unix operating system was developed at AT&T Bell Laboratories in the late 1960s,
originally for the PDP-7, and later for the PDP-11. Because it was essentially free in early
editions, easily obtainable, and easily modified, it achieved wide acceptance. It also became a
requirement within the Bell systems operating companies. Since it was written in the C
language, when that language was ported to a new machine architecture, Unix was also able
to be ported.
Numerous operating systems were based upon it including Minix, GNU/Linux

NEED OF OPERATING SYSTEM:

1. Interface between the user and the computer

An OS provides a very easy way to interact with the computer. It provides different features and
GUI so that we can easily work on a computer. We have to interact just by clicking the mouse or
through the keyboard. Thus, we can say that an OS makes working very easy and efficient.

2. Booting

Booting is basically the process of starting the computer. When the CPU is first switched ON it
has nothing inside the memory. So, to start the computer, we load the operating system into the
main memory. Therefore, loading the OS to the main memory to start the computer is booting.
Hence, the Os helps to start the computer when the power is switched ON.

3. Managing the input/output devices

The OS helps to operate the different input/output devices. The OS decides which program or
process can use which device. Moreover, it decides the time for usage. In addition to this, it
controls the allocation and deallocation of devices.

4. Multitasking

The OS helps to run more than one application at a time on the computer. It plays an important
role while multitasking. Since it manages memory and other devices during multitasking.
Therefore, it provides smooth multitasking on the system.
5. Platform for other application software

Users require different application programs to perform specific tasks on the system. The OS
manages and controls these applications so that they can work efficiently. In other words, it acts
as an interface between the user and the applications.

Some other uses/need for operating system are:

6. Manages the memory

It helps in managing the main memory of the computer. Moreover, It allocates and deallocates
memory to all the applications/tasks.

7. Manages the system files

It helps to manage files on the system. As we know, all the data on the system is in the form of
files. It makes interaction with the files easy.

8. Provides Security

It keeps the system and applications safe through authorization. Thus, the OS provides security
to the system.

9. Acts as an Interface

It is an interface between computer hardware and software. Moreover, it is an interface between


the user and the computer.

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.  
Advantages of Batch Operating System: 
 It is very difficult to guess or know the time required for any job to complete.
Processors of the batch systems know how long the job would be when it is in
queue
 Multiple users can share the batch systems
 The idle time for the batch system is very less
 It is easy to manage large work repeatedly in batch systems
Disadvantages of Batch Operating System:  
 The computer operators should be well known with batch systems
 Batch systems are hard to debug
 It is sometimes costly
 The other jobs will have to wait for an unknown time if any job fails
Examples of Batch based Operating System: Payroll System, Bank Statements, etc. 
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. 
Advantages of Time-Sharing OS:  
 Each task gets an equal opportunity
 Fewer chances of duplication of software
 CPU idle time can be reduced
Disadvantages of Time-Sharing OS:  
 Reliability problem
 One must have to take care of the security and integrity of user programs and
data
 Data communication problem
Examples of Time-Sharing OSs are: Multics, Unix, etc. 
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. 
 
Advantages of Distributed Operating System:  
 Failure of one will not affect the other network communication, as all systems
are independent from each other
 Electronic mail increases the data exchange speed
 Since resources are being shared, computation is highly fast and durable
 Load on host computer reduces
 These systems are easily scalable as many systems can be easily added to the
network
 Delay in data processing reduces
Disadvantages of Distributed Operating System:  
 Failure of the main network will stop the entire communication
 To establish distributed systems the language which is used are not well defined
yet
 These types of systems are not readily available as they are very expensive. Not
only that the underlying software is highly complex and not understood well yet
Examples of Distributed Operating System are- LOCUS, etc. 
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. 
 

Advantages of Network Operating System:  


 Highly stable centralized servers
 Security concerns are handled through servers
 New technologies and hardware up-gradation are easily integrated into the
system
 Server access is possible remotely from different locations and types of systems
Disadvantages of Network Operating System:  
 Servers are costly
 User has to depend on a central location for most operations
 Maintenance and updates are required regularly
Examples of Network Operating System are: Microsoft Windows Server 2003,
Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD,
etc. 
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. 
Real-time systems are used when there are time requirements that are very strict like
missile systems, air traffic control systems, robots, etc. 
Two types of Real-Time Operating System which are as follows: 
 Hard Real-Time Systems: 
These OSs are meant for applications where time constraints are very strict and
even the shortest possible delay is not acceptable. These systems are built for
saving life like automatic parachutes or airbags which are required to be readily
available in case of any accident. Virtual memory is rarely found in these
systems.
 Soft Real-Time Systems: 
These OSs are for applications where for time-constraint is less strict.
 

Advantages of RTOS:  
 Maximum Consumption: Maximum utilization of devices and system, thus
more output from all the resources
 Task Shifting: The time assigned for shifting tasks in these systems are very
less. For example, in older systems, it takes about 10 microseconds in shifting
one task to another, and in the latest systems, it takes 3 microseconds.
 Focus on Application: Focus on running applications and less importance to
applications which are in the queue.
 Real-time operating system in the embedded system: Since the size of
programs are small, RTOS can also be used in embedded systems like in
transport and others.
 Error Free: These types of systems are error-free.
 Memory Allocation: Memory allocation is best managed in these types of
systems.
Disadvantages of RTOS:  
 Limited Tasks: Very few tasks run at the same time and their concentration is
very less on few applications to avoid errors.
 Use heavy system resources: Sometimes the system resources are not so good
and they are expensive as well.
 Complex Algorithms: The algorithms are very complex and difficult for the
designer to write on.
 Device driver and interrupt signals: It needs specific device drivers and
interrupts signals to respond earliest to interrupts.
 Thread Priority: It is not good to set thread priority as these systems are very
less prone to switching tasks.
Examples of Real-Time Operating Systems are: Scientific experiments, medical imaging
systems, industrial control systems, weapon systems, robots, air traffic control systems, etc.

UNIPROGRAMMING VS MULTIPROGRAMMING:

What is uniprogramming

Uniprogramming means one program sits in main memory at a time. Uniprogramming was
used in old computers and mobiles. When the computer starts then operating system and
application programs are loaded into main memory. We only count user programs running in
RAM. RAM is also called main memory.

In old operating systems (OS) only one program runs on the computer at a time. Either of the
browser, calculator or word processor runs at a time. These type of operating systems in
which one program runs at a time are known as Uniprogramming operating systems.

What is multiprogramming
In multiprogramming, multiple programs reside in main memory (RAM) at a time. OS which
handles multiple programs at a time is known as multiprogramming operating system. One
processor or CPU can only run one process at a time. OS use context switching in main
memory for running multiple programs. Context switching is to switch programs so all
programs are given a suitable amount of time. OS can handle only a limited number of
programs. If we run many programs on the computer or mobile then the computer becomes
very slow or unresponsive.

Uniprogramming vs multiprogramming

In Uniprogramming only one program sits in main memory so it has a small size. But in the
case of multiprogramming main memory needs more space. Uniprogramming system runs
smoothly as only one task is run at a time. The slow processor can also work well in
Uniprogramming but in multiprogramming processor needs to be fast. In multiprogramming
large space of RAM is needed. Fixed size partition is used in Uniprogramming. Both fixed
and variable size partition can be used in multiprogramming systems.

Example of uniprogramming

 Batch processing in old computers and mobiles


 The old operating system of computers
 Old mobile operating system

Example of multiprogramming

 Modern operating systems like Windows XP and Windows 7,8,10

MULTI TASKING AND MULTI PROCESSING SYSTEMS:

Multi-tasking : 
Multi-tasking is the logical extension of multiprogramming. In this system, the CPU
executes multiple jobs by switching among them typically using a small time quantum, and
these switches occur so frequently that the users can interact with each program while it is
running. Multitasking is further classified into two categories: Single User & Multiuser.  
 
1. Single User Multi Tasking:

A single-user multitasking operating system is an operating system that allows a single


user to simultaneously run multiple applications on a computer. This type of operating
system is found in personal desktop and laptop computers. The most popular single-user
multitasking operating systems include Microsoft Windows and Macintosh.

2. Multi User Multi Tasking:

Multiuser/Multitasking operating system is a powerful operating system that supports more


than one user at a time, performing more than one task at a time, UNIX is an example of a
multiuser/ multitasking operating system.

Multi tasking vs multi programming

In multiprogramming context switching is used and in multitasking, time-sharing is used.


Multiprogramming is a little extension from multitasking. Multiprogramming is used for a
single processor. All programs reside in main memory and handled by the single processor.
Multiprogramming and multitasking are sometimes used for the same purpose but there is the
difference between them as I explained. Multitasking is a new term used in a computer. It is
mostly used in modern games.

Examples of multiprogramming

 Multiple programs running parallel in main memory


 Making fixed and variable partition of programs in memory

Examples of multitasking

 Performing multiple tasks in iPad


 Performing multiple tasks in iPhone
 Multitasking in games
 Using MS word, chrome, listening mp3 at the same time
 Multitasking in games

Multi Processing:

Multiprocessing is a system that has two or more than two processors. In this, CPUs are
added for increasing computing speed of the system. Because of Multiprocessing, there are
many processes that are executed simultaneously. Multiprocessing is further classified into
two categories: Symmetric Multiprocessing and Asymmetric Multiprocessing.  

1. Symmetric Multi processing:

In a symmetric multiprocessing system, two or more processors are connected to a


single, shared main memory. All the processors have full access to the input and
output devices. The operating system treats all these processors equally. It is a
tightly coupled multiprocessor system with a set of similar processors running
independently. Each processor executes different programs and works on different
sets of data. They share the common resources such as memory, IO device, etc.

2. Asymmetric Multi processing:


In asymmetric multiprocessing systems, all the CPUs are not equal. In other
words, one processor might be executing the operating system code while another
processor is performing input and output tasks. Asymmetric multiprocessing
applications are used when each processor is dedicated to performing a specific
task.
Asymmetric multiprocessing uses a master-slave approach. One processor works
as the master while the other processors work as slave processors.  Master
processor monitors the other processors and assigns tasks to each slave processor.
Assume that there are four CPUs as C1, C2, C3 and C4. C4 is the master
processor, and it assigns tasks to the other processors. Assume that C1 is assigned
with process P1, C2 is assigned with process p2, and C3 is assigned with process
p3. Each processor will be working only on the assigned processes.

DISTRIBUTED SYSTEMS:

Distributed System is a collection of autonomous computer systems that are physically


separated but are connected by a centralized computer network that is equipped with
distributed system software. The autonomous computers will communicate among each
system by sharing resources and files and performing the tasks assigned to them.
Example of Distributed System:
Any Social Media can have its Centralized Computer Network as its Headquarters and
computer systems that can be accessed by any user and using their services will be the
Autonomous Systems in the Distributed System Architecture.

 Distributed System Software: This Software enables computers to coordinate


their activities and to share the resources such as Hardware, Software, Data, etc.
 Database: It is used to store the processed data that are processed by each
Node/System of the Distributed systems that are connected to the                      
Centralized network.
 
 

 As we can see that each Autonomous System has a common Application that can
have its own data that is shared by the Centralized Database System.
 To Transfer the Data to Autonomous Systems, Centralized System should be
having a Middleware Service and should be connected to a Network.
 Middleware Services enables some services which are not present in the local
systems or centralized system default by acting as an interface between the
Centralized System and the local systems. By using components of Middleware
Services systems communicate and manage data.
 The Data which is been transferred through the database will be divided into
segments or modules and shared with Autonomous systems for processing.
 The Data will be processed and then will be transferred to the Centralized system
through the network and will be stored in the database.
Characteristics of Distributed System:
 Resource Sharing: It is the ability to use any Hardware, Software, or Data
anywhere in the System.
 Openness: It is concerned with Extensions and improvements in the system (i.e.,
How openly the software is developed and shared with                                others)
 Concurrency: It is naturally present in the Distributed Systems, that deal with the
same activity or functionality that can be performed by separate users who are in
remote locations. Every local system has its independent Operating Systems and
Resources.
 Scalability: It increases the scale of the system as a number of processors
communicate with more users by accommodating to improve the responsiveness
of the system.
 Fault tolerance: It cares about the reliability of the system if there is a failure in
Hardware or Software, the system continues to operate properly without
degrading the performance the system.
 Transparency: It hides the complexity of the Distributed Systems to the Users
and Application programs as there should be privacy in every system.
 Heterogeneity: Networks, computer hardware, operating systems, programming
languages, and developer implementations can all vary and differ among
dispersed system components.
Advantages of Distributed System:
 Applications in Distributed Systems are Inherently Distributed Applications.
 Information in Distributed Systems is shared among geographically distributed
users.
 Resource Sharing (Autonomous systems can share resources from remote
locations).
 It has a better price performance ratio and flexibility.
 It has shorter response time and higher throughput.
 It has higher reliability and availability against component failure.
 It has extensibility so that systems can be extended in more remote locations and
also incremental growth.
Disadvantages of Distributed System:
 Relevant Software for Distributed systems does not exist currently.
 Security possess a problem due to easy access to data as the resources are shared
to multiple systems.
 Networking Saturation may cause a hurdle in data transfer i.e., if there is a lag in
the network then the user will face a problem accessing data.
 In comparison to a single user system, the database associated with distributed
systems is much more complex and challenging to manage.
 If every node in a distributed system tries to send data at once, the network may
become overloaded.
Applications Area of Distributed System:
 Finance and Commerce: Amazon, eBay, Online Banking, E-Commerce
websites.
 Information Society: Search Engines, Wikipedia, Social Networking, Cloud
Computing.
 Cloud Technologies: AWS, Salesforce, Microsoft Azure, SAP.
 Entertainment: Online Gaming, Music, youtube.
 Healthcare: Online patient records, Health Informatics.
 Education: E-learning.
 Transport and logistics: GPS, Google Maps.
 Environment Management: Sensor technologies.

COMPONENTS OF OS:

 Process management
 Files management
 Command Interpreter
 System calls
 Signals
 Network management
 Security management
 I/O device management
 Secondary storage management
 Main memory management

Process Management :

A process is a program in execution. It consists of the followings:


 Executable program
 Program’s data
 Stack and stack pointer
 Program counter and other CPU registers 
 Details of opened files
A process can be suspended temporarily and the execution of another process can be taken
up. A suspended process can be restarted later. Before suspending a process, its details are
saved in a table called the process table so that it can be executed later on. An operating
system supports two system calls to manage processes Create and Kill –
 Create a system call used to create a new process.
 Kill system call used to delete an existing process.
A process can create a number of child processes. Processes can communicate among
themselves either using shared memory or by message-passing techniques. Two processes
running on two different computers can communicate by sending messages over a network.

Files Management :

Files are used for long-term storage. Files are used for both input and output. Every
operating system provides a file management service. This file management service can
also be treated as an abstraction as it hides the information about the disks from the user.
The operating system also provides a system call for file management. The system call for
file management includes –
 File creation
 File deletion
 Read and Write operations
Files are stored in a directory. System calls provide to put a file in a directory or to remove
a file from a directory. Files in the system are protected to maintain the privacy of the user.
Below shows the Hierarchical File Structure directory.
 

Command Interpreter :

There are several ways for users to interface with the operating system. One of the
approaches to user interaction with the operating system is through commands. Command
interpreter provides a command-line interface. It allows the user to enter a command on
the command line prompt (cmd). The command interpreter accepts and executes the
commands entered by a user. For example, a shell is a command interpreter under UNIX.
The commands to be executed are implemented in two ways:
 The command interpreter itself contains code to be executed.
 The command is implemented through a system file. The necessary system file
is loaded into memory and executed.

System Calls :

System calls provide an interface to the services made by an operating system. The user
interacts with the operating system programs through System calls. These calls are
normally made available as library functions in high-level languages such as C, Java,
Python etc. It provides a level of abstraction as the user is not aware of the implementation
or execution of the call made. Details of the operating system is hidden from the user.
Different hardware and software services can be availed through system calls.
System calls are available for the following operations:
 Process Management
 Memory Management
 File Operations
 Input / Output Operations  

Signals :

Signals are used in the operating systems to notify a process that a particular event has
occurred. Signals are the software or hardware interrupts that suspend the current execution
of the task. Signals are also used for inter-process communication. A signal follows the
following pattern :
 A signal is generated by the occurrence of a particular event it can be the
clicking of the mouse, the execution of the program successfully or an error
notifying, etc.
 A generated signal is delivered to a process for further execution.
 Once delivered, the signal must be handled.
 A signal can be synchronous and asynchronous which is handled by a default
handler or by the user-defined handler.
The signal causes temporarily suspends the current task it was processing, saves its
registers on the stack, and starts running a special signal handling procedure, where the
signal is assigned to it.

Network Management :

In today’s digital world, the complexity of networks and services has created modern
challenges for IT professionals and users. Network management is a set of processes and
procedures that help organizations to optimize their computer networks. Mainly, it ensures
that users have the best possible experience while using network applications and services.
Network management is a fundamental concept of computer networks. Network
Management Systems is a software application that provides network administrators with
information on components in their networks. It ensures the quality of service and
availability of network resources. It also examines the operations of a network, reconstructs
its network configuration, modifies it for improving performance of tasks.

Security Management:

The security mechanisms in an operating system ensure that authorized programs have
access to resources, and unauthorized programs have no access to restricted resources.
Security management refers to the various processes where the user changes the file,
memory, CPU, and other hardware resources that should have authorization from the
operating system. 

I/O Device Management :

The I/O device management component is an I/O manager that hides the details of
hardware devices and manages the main memory for devices using cache and spooling.
This component provides a buffer cache and general device driver code that allows the
system to manage the main memory and the hardware devices connected to it. It also
provides and manages custom drivers for particular hardware devices. 
The purpose of the I/O system is to hide the details of hardware devices from the
application programmer. An I/O device management component allows highly efficient
resource utilization while minimizing errors and making programming easy on the entire
range of devices available in their systems. 

Secondary Storage Management : 


Broadly, the secondary storage area is any space, where data is stored permanently and the
user can retrieve it easily. Your computer’s hard drive is the primary location for your files
and programs. Other spaces, such as CD-ROM/DVD drives, flash memory cards, and
networked devices, also provide secondary storage for data on the computer. The
computer’s main memory (RAM) is a volatile storage device in which all programs reside,
it provides only temporary storage space for performing tasks. Secondary storage refers to
the media devices other than RAM (e.g. CDs, DVDs, or hard disks) that provide additional
space for permanent storing of data and software programs which is also called non-volatile
storage.

Main memory management :

Main memory is a flexible and volatile type of storage device. It is a large sequence of
bytes and addresses used to store volatile data. Main memory is also called Random Access
Memory (RAM), which is the fastest computer storage available on PCs. It is costly and
low in terms of storage as compared to secondary storage devices. Whenever computer
programs are executed, it is temporarily stored in the main memory for execution. Later, the
user can permanently store the data or program in the secondary storage device.

PROCESS MANAGEMENT SUBSYSTEM:

One of the fundamental functions of an OS is process management. A process is a program


under execution

You might also like