Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views30 pages

Introduction To Operating System Unit 1

Uploaded by

sucheta
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)
7 views30 pages

Introduction To Operating System Unit 1

Uploaded by

sucheta
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/ 30

Unit 1

1.1 Introduction to operating system


1.2 Types of operating system
1.3 Functions of operating system
1.4 History and development of Linux
1.5 Features of Linux
1.6 Login, logout procedure
1.7 Concept of shell, Kernel
1.8 Kernel-shell relationship

Introduction to Operating System


An operating system acts as an intermediary between the user of a computer and
computer hardware. In short its an interface between computer hardware and
user.
• The purpose of an operating system is to provide an environment in
which a user can execute programs conveniently and efficiently.
• An operating system is software that manages computer hardware
and software. The hardware must provide appropriate mechanisms to
ensure the correct operation of the computer system and to prevent
user programs from interfering with the proper operation of the
system.
• The operating system (OS) is a program that runs at all times on a
computer. All other programs, including application programs, run
on top of the operating system.
• It does assignment of resources like memory, processors and input /
output devices to different processes that need the resources. The
assignment of resources has to be fair and secure.

The Operating System as a User Interface:


1. User (Interacts with the system)
2. System and application programs (Software tools for the user)
3. Operating system (Manages hardware and software resources)
4. Hardware (Physical computing devices)
Every general-purpose computer consists of hardware, an operating system(s),
system programs and application programs. The hardware consists of memory,
CPU, ALU, I/O devices, peripheral devices and storage devices. The system
program consists of compilers, loaders, editors, OS, etc.
Every computer must have an operating system to run other programs. The
operating system coordinates the use of the hardware among the various system
programs and application programs for various users. It simply provides an
environment within which other programs can do useful work.

An OS is a package of some programs that runs on a computer machine,


allowing it to perform efficiently. It manages the simple tasks of recognizing
input from the keyboard, managing files and directories on disk, displaying
output on the screen and controlling peripheral devices.

Goals of Operating System


Primary Goals
The primary goals of an operating system (OS) are to provide a easy to use
and convenient environment for executing user programs.
1. User Convenience : It should be easy to use, providing a user-
friendly interface and making it simple to interact with the system.
2. Program Execution: It facilitates the execution of user programs,
providing the necessary environment and services for them to run.
3. Resource Management: The OS manages and allocates the
computer's resources, including the CPU, memory, disk storage, and
input/output devices, to ensure fair utilization.
4. Security: The OS protects the system and user data from
unauthorized access, ensuring the confidentiality, integrity, and
availability of information.
Secondary Goals
1. Efficient Resource Utilization: It should aim to maximize the
performance and utilization of computer resources like CPU,
Memory and IO devices, ensuring that the system runs smoothly and
efficiently.
2. Reliability: It should be robust and reliable, able to handle errors and
exceptions gracefully, ensuring that the system continues to operate
smoothly. It should be modular in design and easy to debug.
List of Common Operating Systems
There are multiple types of operating systems each having its own unique
features:
Windows OS
• Developer : Microsoft
• Key Features : User-friendly interface, software compatibility,
hardware support, Strong gaming support.
• Advantages : Easy to use for most users, Broad support from third-
party applications ,Frequent updates and support.
• Typical Use Cases : Personal computing, Business environment,
Gaming.
macOS
• Developer : Apple.
• Key Features : Sleek, intuitive user interface, Strong integration
with other Apple products, Robust security features, High
performance and stability.
• Advantages : Optimized for Apple hardware, Seamless experience
across Apple ecosystem, Superior graphics and multimedia
capabilities.
• Typical Use Cases : Creative industries (design, video editing, music
production), Personal computing, Professional environments.
Linux
• Developer : Community-driven (various distributions).
• Key Features : Open-source and highly customizable, Robust
security and stability, Lightweight and can run on older hardware,
Large selection of distributions (e.g., Ubuntu, Fedora, Debian).
• Advantages : Free to use and distribute, Strong community support,
Suitable for servers and development environments.
• Typical Use Cases : Servers and data centers, Development and
programming, Personal computing for tech enthusiasts.
Unix
• Developer: Originally AT&T Bell Labs, various commercial and
open-source versions available
• Key Features: Multiuser and multitasking capabilities, Strong
security and stability, Powerful command-line interface, Portability
across different hardware platforms
• Advantages: Reliable and robust performance, Suitable for high-
performance computing and servers, Extensive support for
networking
some of the important characteristic features of operating systems:

1. Device Management: The operating system keeps track of all the devices.
So, it is also called the Input/Output controller that decides which process
gets the device, when and for how much time.
2. File Management: It allocates and de-allocates the resources and also
decides who gets the resource.
3. Job Accounting: It keeps track of time and resources used by various jobs
or users.
4. Error-detecting Aids: These contain methods that include the production
of dumps, traces, error messages and other debugging and error-detecting
methods.
5. Memory Management: It is responsible for managing the primary
memory of a computer, including what part of it are in use by whom also
check how much amount free or used and allocate process
6. Processor Management: It allocates the processor to a process and then
de-allocates the processor when it is no longer required or the job is done.
7. Control on System Performance: It records the delays between the
request for a service and the system.
8. Security: It prevents unauthorized access to programs and data using
passwords or some kind of protection technique.
9. Convenience: An OS makes a computer more convenient to use.
10. Efficiency: An OS allows the computer system resources to be used
efficiently.
11. Ability to Evolve: An OS should be constructed in such a way as to permit
the effective development, testing and introduction of new system functions
at the same time without interfering with service.
12. Throughput: An OS should be constructed so that It can give maximum
throughput (Number of tasks per unit time).

Types of Operating Systems


Operating Systems can be categorized according to different criteria like
whether an operating system is for mobile devices (examples Android and iOS)
or desktop (examples Windows and Linux).
Here, we are going to classify based on functionalities an operating system
provides.

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 requirements and groups
them into batches. It is the responsibility of the operator to sort jobs with similar
needs. Batch Operating System is designed to manage and execute a large
number of jobs efficiently by processing them in groups.

Advantages of Batch Operating System


1. Multiple users can share the batch systems.
2. The idle time for the batch system is very little.
3. It is easy to manage large work repeatedly in batch systems.
Disadvantages of Batch Operating System
1. CPU is not used efficiently. When the current process is doing IO, the
CPU is free and could be utilized by other processes waiting.
2. The other jobs will have to wait for an unknown time if any job fails.
3. In a batch operating system, average response time increases as all
processes are processed one by one.
Examples of Batch Operating Systems: Payroll Systems, Bank Statements,
etc.

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 Multi-programmed Batch Systems and Time-
Sharing Systems is that in case of Multi-programmed 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.

Advantages of Timesharing operating systems −


1. Provides the advantage of quick response.
2. Avoids duplication of software.
3. Reduces CPU idle time.

Disadvantages of Time-sharing operating systems −


1. Problem of reliability.
2. Question of security and integrity of user programs and data.
3. Problem of data communication.

3. Distributed Operating System


These types of operating systems are a recent advancement in the world of
computer technology and are being widely accepted all over the world and, that
too, at 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. Systems. These
systems' processors differ in size and function. The major benefit of working
with these types of operating systems is that it is always possible that one user
can access the files or software which are not present on his system but on some
other system connected within this network, i.e., remote access is enabled within
the devices connected to that network.
Advantages of Distributed Operating System
1. Failure of one will not affect the other network communication, as all
systems are independent of each other.
2. Electronic mail increases the data exchange speed.
3. Since resources are being shared, computation is highly fast and
durable.
4. Load on host computer reduces.
5. These systems are easily scalable as many systems can be easily added
to the network.
6. Delay in data processing reduces.
Disadvantages of Distributed Operating System
1. Failure of the main network will stop the entire communication.
2. To establish distributed systems, the language is not yet well-defined.
3. 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 Systems are LOCUS, etc.
Issues With Distributed Operating Systems
1. Networking causes delays in the transfer of data between nodes of a
distributed system. Such delays may lead to an inconsistent view of data
located in different nodes and make it difficult to know the chronological
order in which events occurred in the system.
2. Control functions like scheduling, resource allocation, and deadlock
detection have to be performed in several nodes to achieve computation
speedup and provide reliable operation when computers or networking
components fail.
3. Messages exchanged by processes present in different nodes may travel
over public networks and pass through computer systems that are not
controlled by the distributed operating system. An intruder may exploit this
feature to tamper with messages or create fake messages to fool the
authentication procedure and masquerade as a user of the system.
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 to 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 connections, etc., and that’s why these computers are popularly known
a tightly coupled systems.

Advantages of Network Operating System


1. Highly stable, centralized servers.
2. Security concerns are handled through servers.
3. New technologies and hardware upgrades are easily integrated into the
system.
4. Server access is possible remotely from different locations and types of
systems.
Disadvantages of Network Operating System
1. Servers are costly.
2. The user has to depend on a central location for most operations.
3. Maintenance and updates are required regularly.
Examples of Network Operating Systems are Microsoft Windows Server
2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell
NetWare, BSD, etc.

5. 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.
A. 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.
B. 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.

Advantages of RTOS
1. Maximum Consumption: Maximum utilization of devices and systems,
thus more output from all the resources.
2. Task Shifting: The time assigned for shifting tasks in these systems is very
less. For example, in older systems, it takes about 10 microseconds to shift
from one task to another, and in the latest systems, it takes 3 microseconds.
3. Focus on Application: Focus on running applications and give less
importance to applications that are in the queue.
4. Real-time operating system in the embedded system: Since the size of
programs is small, RTOS can also be used in embedded systems like in
transport and others.
5. Error-Free,: These types of systems are error-free.
6. Memory Allocation: Memory allocation is best managed in these types of
systems.
Disadvantages of RTOS
1. Limited Tasks: Very few tasks run at the same time and their
concentration is very less on a few applications to avoid errors.
2. Use heavy system resources: Sometimes the system resources are not so
good and they are expensive as well.
3. Complex Algorithms: The algorithms are very complex and difficult for
the designer to write.
4. Device driver and interrupt signals: It needs specific device drivers and
interrupt signals to respond earliest to interrupts.
5. Thread Priority: It is not good to set thread priority, as these systems are
much 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.

Functions of Operating System


An Operating System acts as a communication interface between the user and
computer hardware. Its purpose is to provide a platform on which a user can
execute programs conveniently and efficiently. The main goal of an operating
system is to make the computer environment more convenient to use and to
utilize resources most efficiently.
Operating System handles the following responsibilities:
• Controls all the computer resources.
• Provides valuable services to user programs.
• Coordinates the execution of user programs.
• Provides resources for user programs.
• Provides an interface (virtual machine) to the user.
• Hides the complexity of software.
• Supports multiple execution modes.
• Monitors the execution of user programs to prevent errors.
Functions of an Operating System

1. Process Management -
Process management in operating system is about managing processes.
A Process is a running program. The life cycle of process is from the moment
program start until it finishes.
Operating system makes sure each process:
• gets its turn to use the CPU
• synchronized when needed
• has access to the resources it needs, like memory, files, and input/output
devices.
It also handles issues like process coordination and communication, while
preventing conflicts such as deadlocks. This way, the OS ensures smooth
multitasking and efficient resource use.
Process State Diagram
Core Functions in Process Management:
Process Scheduling
• Allocates CPU time to processes based on scheduling algorithms
like Round Robin or Priority Scheduling.
• Ensures fair distribution of CPU time, avoiding starvation of lower-
priority processes.
• Maximizes CPU utilization by determining which process runs at any
given time.
Process Synchronization
• Coordinate multiple processes to ensure orderly execution and
prevent conflicts.
• Prevents race conditions by ensuring that only one process can access
a shared resource at a time.
• Uses synchronization mechanisms like locks, semaphores,
and monitors to coordinate process access.
Deadlock Handling
• Prevents deadlocks by using strategies like resource allocation
graphs or avoiding circular wait conditions.
• Detects deadlocks when they occur, allowing the system to identify
and resolve the issue.
• Recovers from deadlocks by aborting or rolling back processes to
free up resources.
Inter-Process Communication (IPC):
• Facilitates communication between processes through shared
memory, allowing processes to exchange data directly.
• Uses message passing to send data between processes in different
address spaces.
• Enables efficient data exchange and coordination in a multitasking
environment, improving system performance.

2. Memory Management
Memory management is an essential task of the operating system that handles
the storage and organization of data in both main (primary)
memory and secondary storage. The OS ensures that memory is allocated and
deallocated properly to keep programs running smoothly. It also manages the
interaction between volatile main memory and non-volatile secondary storage.

Key Activities in Memory Management:


Main Memory Management
• Memory Allocation: Assigns memory to processes using techniques
like paging and segmentation.
• Memory Deallocation: Frees memory when no longer needed.
• Memory Protection: Prevents processes from accessing each other’s
memory.
• Virtual Memory: Uses disk space as extra memory to run larger
processes.
• Fragmentation: Manages wasted memory space (internal/external)
through compaction.
Secondary Memory Management
• Disk Space Allocation: Organizes how files are stored on the disk
(contiguous, linked, indexed).
• File System Management: Manages files and directories for
efficient data access.
• Free Space Management: Tracks available space on the disk.
• Disk Scheduling: Organizes the order of disk read/write requests.
• Backup and Recovery: Ensures data is backed up and can be
restored after failure.

3. File System Management


File management in the operating system ensures the organized storage, access
and control of files. The OS abstracts the physical storage details to present a
logical view of files, making it easier for users to work with data. It manages
how files are stored on different types of storage devices (like hard drives or
SSDs) and ensures smooth access through directories and permissions.

File System Management includes managing of:


File Attributes
• File Name: Identifies the file with a name and extension (e.g., .txt,
.jpg).
• File Type: Defines the format of the file (e.g., text, image,
executable).
• Size: The amount of storage the file occupies.
• Permissions: Determines who can read, write, or execute the file.
File Types
• Text Files: Contain human-readable content (e.g., .txt, .md).
• Binary Files: Store data in binary format (e.g., .jpg, .mp3).
• Executable Files: Contain program code (e.g., .exe, .out).
Operations on Files
• Create: Allows users to create new files.
• Read: Opens files to read their contents.
• Write: Modifies the contents of a file.
• Delete: Removes a file from the system.
Access Methods
• Sequential Access: Reads data in order, from start to finish.
• Direct Access: Jumps to a specific part of the file.
• Indexed Access: Uses an index for quick data retrieval.

4. Device Management (I/O System)


Device management of an operating system handles the communication
between the system and its hardware devices, like printers, disks or network
interfaces. The OS provides device drivers to control these devices, using
techniques like Direct Memory Access (DMA) for efficient data transfer and
strategies like buffering and spooling to ensure smooth operation.

Major components in Device Management:


Device Drivers: The operating system uses device drivers to interact with
hardware devices. There are two types of device drivers:
• Kernel-space drivers run in the OS kernel, offering direct access to
hardware.
• User-space drivers run outside the kernel and are more isolated,
providing safety but less performance.
Buffering & Caching:
• Buffering temporarily stores data in memory to manage differences
in device speeds. Block devices (e.g., hard drives) use larger blocks
of data for buffering, while character devices (e.g., keyboards, mice)
use smaller, byte-by-byte buffering.
• Caching improves access speed by storing frequently accessed data
in a faster storage medium (like RAM).
Spooling: Spooling manages data waiting to be processed, particularly in
devices like printers. The OS places print jobs in a spool (a temporary storage
area), allowing the CPU to continue other tasks while the printer works through
the queue. Other examples include mail spooling (for managing outgoing email)
and batch-job spooling (for managing scheduled tasks).

5. Protection and Security


Protection and security mechanisms in an operating system are designed to
safeguard system resources from unauthorized access or misuse. These
mechanisms control which processes or users can access specific resources
(such as memory, files, and CPU time) and ensure that only authorized users
can perform specific actions. While protection ensures proper access control,
security focuses on defending the system against external and internal attacks.

• Access Control: The operating system ensures that processes and


users can only access resources they are authorized to. This is
achieved through mechanisms like memory-addressing hardware
(which keeps processes within their own address space) and timer
interrupts (which prevent processes from monopolizing the CPU).
• User Authentication: A system identifies users through user IDs
(UIDs) or Security IDs (SIDs). During login, the operating system
verifies the user’s credentials, ensuring that only authorized users can
access their data or system resources.
• Resource Protection: Mechanisms like file protection (ensuring
only authorized users can access or modify files) and device
protection (restricting direct access to device-control registers)
ensure the integrity of system resources, preventing unauthorized or
harmful use.
• Security Against Attacks: Security mechanisms defend against
external threats like viruses, worms, denial-of-service attacks, and
identity theft. These attacks can misuse system resources, steal
sensitive data, or disrupt system operation. The OS works to prevent
these threats and minimize damage.

6. Additional Functions of the Operating System


Beyond core tasks like process and memory management, operating systems
also focus on system performance, resource utilization and error detection.
These functions ensure smooth operation, efficient resource allocation and
system reliability.
• Control Over System Performance: The OS monitors system
performance by recording delays between service requests and
system responses. This helps identify bottlenecks and optimize
resource usage, ensuring efficient system operation.
• Job Accounting: The OS keeps track of time and resources used by
various tasks and users. This information is valuable for auditing,
billing, and optimizing resource allocation among users and
applications.
• Error-Detecting Aids: The OS produces dumps, traces, error
messages, and other debugging aids to detect and diagnose errors.
This proactive approach helps maintain system stability and aids in
troubleshooting issues.

What is Linux Operating System


The Linux Operating System is a type of operating system that is similar
to Unix, and it is built upon the Linux Kernel. The Linux Kernel is like the brain
of the operating system because it manages how the computer interacts with its
hardware and resources. It makes sure everything works smoothly and
efficiently. But the Linux Kernel alone is not enough to make a complete
operating system.
To create a full and functional system, the Linux Kernel is combined with
a collection of software packages and utilities, which are together called Linux
distributions.
These distributions make the Linux Operating System ready for users to
run their applications and perform tasks on their computers securely and
effectively. Linux distributions come in different flavors, each tailored to suit
the specific needs and preferences of users.

Linux History
Linus Torvalds designed the free and open-source Linux operating system
kernel in 1991, inspired by the UNIX operating system and the MINIX operating
system. His goal was to build a flexible and affordable platform for personal
computing. The initial release of the Linux kernel quickly drew global attention
from developers and enthusiasts, encouraging collaborative development. Over
time, this led to the creation of complete Linux distributions, powered by the
kernel and supported by open-source software packages.
Over the years, Linux has become known as a key component of modern
computing, powering everything from servers and personal computers to
supercomputers and smartphones. Due to its flexibility, durability, and strong
community support, developers, businesses, and educational institutions
frequently opt for it.

What is Linux?
Linux is based on the UNIX operating system. UNIX is a powerful,
multi-user, multitasking operating system originally developed in the 1970s at
AT&T Bell Labs. It laid the foundation for many modern operating systems,
including Linux.
While UNIX is a licensed operating system (meaning you need to
purchase a license to use it), Linux is free and open-source, making it
accessible to everyone. Anyone can inspect and modify the source code, which
enables global collaboration and innovation. Its efficient performance and
strong security model make it suitable for a wide variety of devices and
industries.
Since the beginning, Linux has grown into a dependable and safe OS that
is used in an array of gadgets, including PCs, cell phones, and huge
supercomputers. It is well-known for being cost-effective, which implies that
employing it doesn't cost a lot, and efficient, which indicates it can complete a
lot of jobs quickly.

Origins and Early Development


1. UNIX Background (1969–1980s)
• UNIX, developed in 1969 at AT&T’s Bell Labs, became a popular,
multi-user operating system used in universities and research labs.
• UNIX was closed-source, but its design principles inspired many
alternatives.
• The POSIX standard was developed to ensure UNIX-like systems
remained compatible.
2. MINIX (1987)
• MINIX was created by Andrew S. Tanenbaum for educational
purposes.
• It was a small UNIX-like OS but had limited capabilities.
• MINIX inspired Linus Torvalds, a Finnish computer science student.
Birth of Linux
3. Linus Torvalds and the First Linux Kernel (1991)
• In 1991, Linus Torvalds began working on a new operating system
kernel as a hobby.
• On August 25, 1991, he posted on the MINIX newsgroup:
“I'm doing a (free) operating system (just a hobby, won't be big and
professional like GNU)…”
• The first version (0.01) was released in September 1991.
• Linux initially worked only on Intel x86 hardware.

Key Characteristics of Linux


• Open-source and community-driven
• Highly customizable and modular
• Stable, secure, and efficient
• Runs on virtually any hardware platform
• Backbone of cloud infrastructure, containers (e.g., Docker,
Kubernetes), and supercomputers

Linux Today
• Powers:
o 100% of the top 500 supercomputers
o The majority of web servers and cloud services
o Over 70% of smartphones (via Android)
• Major contributors: Red Hat, Canonical, SUSE, Intel, Google,
Microsoft
• Maintained by the Linux Foundation, with Linus Torvalds still
overseeing kernel development.

Timeline Summary
Year Milestone

1991 Linus Torvalds releases Linux kernel 0.01

1992 Linux licensed under GPL

1993 Debian, Slackware released

1994 Red Hat Linux released

2004 Ubuntu launched

2008 Android released


Year Milestone

2011+ Dominates servers, cloud, and embedded systems

Features of Linux operating system


1. Open-Source Foundation
The open-source foundation of the Linux operating system means that its building
blocks, like the code that makes it work, are freely available for anyone to see,
modify, and share.
Key Benefits:
• Everyone can access the source code without any restrictions, encouraging

collaboration and sharing.


• The openness of the source code ensures transparency in how the operating

system is built and functions.


2. Multitasking Capabilities
The multitasking capabilities of the Linux operating system allow it to handle
several tasks simultaneously, enhancing efficiency and the user experience.
Key Benefits:
• Linux can perform multiple tasks at the same time, enabling users to run

various applications concurrently.


• It can prioritize tasks based on their importance, ensuring critical processes

receive the necessary resources.


3. Multiuser Support
The multi-user support in the Linux operating system allows multiple users to
access and use the system simultaneously, each with their personalized
environment.
Key Benefits:
• Multiuser support enhances security by assigning different access levels to

users, preventing unauthorized access to sensitive information.


• Users can share resources like files and applications while maintaining
individual user spaces.
4. Robust Security Measures
The Linux operating system is well-known for its strong security features, which
incorporate measures to protect user data and prevent unauthorized access.
Key Benefits:
• Linux employs strict user privilege access management, limiting access to

critical system functions and files.


• Linux includes tools for auditing system activity and helping

administrators track and analyze security events.


5. Stability
The stability of the Linux operating system refers to its consistent and reliable
performance, with minimal instances of crashes or system failures.
Key Benefits:
• Linux is recognized for its dependable and continuous operation, providing

a stable platform for various computing tasks.


• Linux systems can often achieve long periods of uptime without the need

for frequent reboots, indicating their robust stability.


6. Advanced Networking Features
Linux is equipped with advanced computer network capabilities, offering a
versatile set of features that enhance communication, connectivity, and overall
networking efficiency.
Key Benefits:
• Linux provides advanced IP routing features, enabling efficient data
routing across networks.
• It includes support for IPsec and VPN technologies, enhancing network
security for secure data transmission.
7. Portability Across Platforms
The portability of the Linux operating system refers to its ability to run on various
hardware architectures, providing flexibility and adaptability across different
computing platforms.
Key Benefits:
• Linux’s adaptability extends to embedded systems, making it a popular
choice for devices like routers, smart TVs, and other IoT applications.
• Developers can write software on one architecture and deploy it on another,
showcasing Linux’s flexibility for cross-architecture development.
8. Extensive Customization Options
Linux offers users a high degree of customization, allowing them to tailor the
system to their specific preferences and requirements.
Key Benefits:
• Users can customize system fonts, enhancing readability and visual appeal

according to personal taste.


• Linux supports various desktop environments (e.g., GNOME, KDE, Xfce),

enabling users to choose the look and feel that suits their preferences.

9. Supports GUI
Linux supports Graphical User Interfaces (GUIs) that provide users with visual
interfaces to interact with the operating system and applications.
Key Benefits:
• Linux offers a variety of desktop environments, such as GNOME, KDE,

Xfce, and LXQt, providing diverse visual experiences for users.


• Users can choose different window managers, each offering unique ways

to manage and organize application windows on the desktop.

Login and Logout procedure

To ensure security and organization on a system with many users, Linux


machines employ a system of user accounts. The user accounting features of
Linux provide a basis for analysis and control of system resources, preventing
any user from taking up more than his or her share, and preventing unauthorized
people from accessing the system. Every user of a Linux system must get
permission by some access control mechanism.

1. Logging in
Logging in to a Linux system requires two pieces of information: A username,
and a password. When you sit down for a Linux session, you are given a login
prompt that looks like this:
login:
Type your username at the login prompt, and press the return key. The system
will then ask you for your password. When you type your password, the screen
will not display what you type.
Your username
Your username is assigned by the person who creates your account. At ISU, the
standard username is the first four letters of your last name concatenated with the
first four letters of your first name. Your username must be unique on the system
where your account exists since it is the means by which you are identified on the
system.
Your password
When your account is created, a password is assigned. The first thing you should
do is change your password, using the passwd utility. To change your password,
type the command
passwd
after you have logged in. The system will ask for your old password, to prevent
someone else from sneaking up, and changing your password. Then it will ask
for your new password. You will be asked to confirm your new password, to
make sure that you didn't mistype. It is very important that you choose a good
password, so that someone else cannot guess it. Here are some rules for selecting
a good password:

• Do not use any part of your name, your spouse's name, your child's name,
your pet's name, or anybody's name. Do not use any backward spellings
of any name, either.
• Do not use an easily-guessable number, like your phone number, your
social security number, your address, license plate number, etc.
• Do not use any word that can be found in an English or foreign-language
dictionary.
• Do not use all the same letter, or a simple sequence of keys on the
keyboard, like qwerty.
• Do use a mix of upper-case and lower-case letters, numbers, and control
characters.
• Do use at least six characters.

If you have accounts on multiple machines, use a different password on each


machine. Do not choose a password that is so difficult to remember that you must
write it down.

2. Logging Out
When you're ready to quit, type the command
exit
Before you leave your terminal, make sure that you see the login prompt,
indicating that you have successfully logged out. If you have left any unresolved
processes, the Linux system will require you to resolve them before it will let you
log out. Some shells will recognize other commands to log you out, like "logout"
or even "bye".
It is always a good idea to clear the display before you log out, so that the next
user doesn't get a screenful of information about you, your work, or your user
account. You can type the command
clear

right before you log out, or you can press the return key until all the information
is scrolled off the screen.
Concept of Shell and Kernel
In computing, the operating system (OS) serves as the fundamental layer
that bridges the gap between computer hardware and the user. Two critical
components of an operating system are the kernel and the shell. Understanding
the relationship between these two components is fundamental to grasping how
operating systems function and how users interact with their computers.

What is a Shell?
The shell is a command-line interface that allows the user to enter
commands to interact with the operating system. Shell accepts human-readable
commands from users and converts them into something which the kernel can
understand. It is a command language interpreter that executes commands read
from input devices such as keyboards or from files. The shell gets started when
the user logs in or starts the terminal.
The shell also provides various features like command history, tab
completion, and scripting capabilities to make it easier for the user to work with
the system.
Different types of shell
Each shell offers unique features and user experiences for interacting with
Unix/Linux systems, from basic scripting to advanced customization.
1. Bourne Shell (sh)
The Bourne Shell was one of the first shells in Unix. Think of it as the "basic
command helper" that lets you talk to your computer. You could type
commands, run simple programs, and even write small scripts to automate tasks.
It doesn’t have fancy features, but it’s reliable and still used in scripting today.
2. C Shell (csh)
The C Shell was made to feel more like the C programming language, which
many developers already knew. It added cool features like the ability to go back
and run previous commands without typing them again. It was great for quick
tasks, but not the best for serious scripting jobs.
3. Korn Shell (ksh)
The Korn Shell came later to improve on both the Bourne and C shells. It was
powerful, easy to script with, and worked with older scripts too. Big companies
used it because it balanced old and new features well. But at first, it wasn’t free,
which made it harder for everyone to use.
4. Bash (Bourne Again Shell)
Bash is the most popular shell today. It's like an upgraded version of the Bourne
Shell. It lets you use arrow keys to go through old commands, press Tab to auto-
complete file names, and run powerful scripts. It’s free and comes by default in
most Linux systems and even on Mac computers.
Advantages
• Efficient Command Execution
• Scripting capability
Disadvantages
• Limited Visualization
• Steep Learning Curve

What is Kernel?
The kernel is the core component of the operating system that manages
system resources and provides services to other programs running on the
system. It acts as a bridge between the user and the resources of the system by
accessing various computer resources like the CPU, I/O devices and other
resources. It is responsible for tasks such as memory management, process
scheduling, and device drivers. The kernel operates at a lower level than the
shell and interacts directly with the hardware of the computer.
Advantages
• Efficient Resource Management
• Process Management
• Hardware Abstraction
Disadvantages
• Limited Flexibility
• Dependency on Hardware

Difference Between Shell and Kernel


Shell Kernel

Shell allows the users to Kernel controls all the tasks of the
communicate with the kernel. system.

It is the interface between kernel


It is the core of the operating system.
and user.

Its a low level program interfacing


It is a command line interpreter with the hardware (CPU, RAM, disks)
(CLI). on top of which applications are
running.
Shell Kernel

Its types are - Bourne Shell, C Its types are - Monolithic Kernel,
shell, Korn Shell, etc. Micro kernel, Hybrid kernel, etc.

It carries out commands on a


group of files by specifying a It performs memory management.
pattern to match

Shell commands like ls, mkdir


and many more can be used to
It performs process management.
request to complete the specific
operation to the OS.

It is the outer layer of OS. It is the inner layer of OS.

Kernel directly interacts with the


It interacts with user and
hardware by accepting machine
interprets to machine
understandable language from the
understandable language.
shell.

Core component of the operating


Command-line interface that
system that manages system resources
allows user interaction

Provides services to other programs


Interprets and translates user
running on the system
commands

Operates at a lower level than the shell


Acts as an intermediary between
and interacts with hardware
the user and the kernel
Shell Kernel

Responsible for tasks such as memory


Provides various features like
management, process scheduling, and
command history, tab completion,
device drivers
and scripting capabilities

Executes commands and Enables user and applications to


programs interact with hardware resources

Architecture of Linux
Linux is an open-source UNIX-based operating system. The main
component of the Linux operating system is Linux kernel. Like any operating
system, Linux consists of software, computer programs, documentation, and
hardware. The main components of Linux operating system are: Application,
Shell, Kernel, Hardware, Utilities

Linux architecture has the following components:


1. Kernel:
Kernel is the core of the Linux based operating system. It
virtualizes the common hardware resources of the computer to provide
each process with its virtual resources. This makes the process seem
as if it is the sole process running on the machine. The kernel is also
responsible for preventing and mitigating conflicts between different
processes.
Different types of the kernel are:

• Monolithic Kernel
• Hybrid kernels
• Exo kernels
• Micro kernels
2. System Library:
Linux uses system libraries, also known as shared libraries, to
implement various functionalities of the operating system. These
libraries contain pre-written code that applications can use to perform
specific tasks. By using these libraries, developers can save time and
effort, as they don't need to write the same code repeatedly. System
libraries act as an interface between applications and the kernel,
providing a standardized and efficient way for applications to interact
with the underlying system.
3. Shell:
The shell is the user interface of the Linux Operating System. It
allows users to interact with the system by entering commands, which
the shell interprets and executes. The shell serves as a bridge between
the user and the kernel, forwarding the user's requests to the kernel for
processing. It provides a convenient way for users to perform various
tasks, such as running programs, managing files, and configuring the
system.
4. Hardware Layer:
The hardware layer encompasses all the physical components of
the computer, such as RAM (Random Access Memory), HDD (Hard
Disk Drive), CPU (Central Processing Unit), and input/output devices.
This layer is responsible for interacting with the Linux Operating
System and providing the necessary resources for the system and
applications to function properly. The Linux kernel and system
libraries enable communication and control over these hardware
components, ensuring that they work harmoniously together.
5. System Utility:
System utilities are essential tools and programs provided by the
Linux Operating System to manage and configure various aspects of
the system. These utilities perform tasks such as installing software,
configuring network settings, monitoring system performance,
managing users and permissions, and much more. System utilities
simplify system administration tasks, making it easier for users to
maintain their Linux systems efficiently.

You might also like