Module 1
Module 1
Module 1
Module 1
Introduction to Operating Systems
1.1 Overview:
It has a better potential for resource utilization compared to simple serial systems
serving multiple users.
This is well suited for applications with large computation time and no user
interaction. Payroll, forecasting, statistical analysis, and large scientific number
crunching programs are examples for its usage.
Users need not wait during its execution. Batch operating systems will function in
FIFO (first in first out) order.
The main disadvantages of batch operating systems are non-interactive mode of
execution and Offline debugging.
IBM System/360 operating system (OS/360) for IBM system/360, is an example for
batch processing operating systems. In DOS we can emulate the batch processing
using .BAT files.
1.3.2 Time-Sharing systems:
Time-sharing is a popular representative of multiprogramming and multi-user
systems. Large CAD and text processing systems belongs to this category.
Good terminal response is one of the main objectives of such systems providing an
illusion of total dedication.
Time-sharing systems provide equitable sharing of common resources. Most of the
time-sharing operating systems adopted time-slicing/round robin scheduling
algorithm.
Each user/process will receive a portion of the time slot. UNIX and its flavors,
Windows Server are the best examples for multiprogramming, multi-user and time-
sharing systems.
1.3.3 Distributed operating systems:
A distributed operating system is a collection of autonomous computer systems
capable of communication and cooperation via their software and hardware
interconnections.
For example, if we have ‘n’ systems in a distributed environment then the distributed
operating system helps us in balancing the load by sharing processors, I/O devices,
and memory etc. without the knowledge of the user.
The end user will get his output on his terminal. This has a very reliable mode of
operation. The ATM (Automatic Teller Machine) centers of a bank are a classic
example of application of distributed operating systems.
program requests several services, and the OS responds by invoking a series of system
calls to satisfy the request.
A system call is a method for a computer program to request a service from the kernel
of the operating system on which it is running.
System call provides the services of the operating system to the user programs via the
Application Program Interface (API). A system call is a request from computer
software to an operating system's kernel.
How does System Call Work?
Users need special resources: Sometimes programs need to do some special things
that can’t be done without the permission of the OS like reading from a file, writing to
a file, getting any information from the hardware, or requesting a space in memory.
The program makes a system call request: There are special predefined instructions
to make a request to the operating system. These instructions are nothing but just a
“system call”. The program uses these system calls in its code when needed.
Operating system sees the system call: When the OS sees the system call then it
recognizes that the program needs help at this time so it temporarily stops the program
execution and gives all the control to a special part of itself called ‘Kernel’. Now
‘Kernel’ solves the need of the program.
The operating system performs the operations: Now the operating system performs
the operation that is requested by the program. Example: reading content from a file
etc.
Operating system give control back to the program : After performing the special
operation, OS give control back to the program for further execution of program .
Services Provided by System Calls
Process Creation and Management
Main Memory Management
File Access, Directory, and File System Management
Device Handling(I/O)
Protection
Networking, etc.
1.4.2 User Interface:
The operating system in general, provides a user interface to interact with the computer.
The objects available on the monitor provide the user interface to the required program.
There are two types of user interfaces:
Command-line user interface (CUI)
CUI interface allows the user to interact with a computer through text
terminal. MS-DOS is an operating system which provides a CUI.
The commands must be given at the command prompt(C :\>). Since both input
and output are character based, the interface is also known as Character User
Interface.
Hence it is a non-graphical and text based user interface. To overcome some
of the limitations of MSDOS such as-user must remember commands and
parameters can not be used for multi-tasking, a new interface called the
graphical user interface (GUI) was developed.
Graphical user Interface (GUI)
The GUI was first introduced in 1984 by Apple with Macintosh.
GUI is an interface where the commands are selected from menus and icons
rather than typing them from the keyboard.
It allows the user to click on the required icon, with the help of a hand-held
device called Mouse. Windows operating system is the most popular operating
system based on GUI.
The user must click on icons, menus, dialog boxes etc. to interact with the
computer.
The user need not remember any commands as it is available in the form of
menus and icon on monitor.
1.4.3 System Utilities
Utilities are those helpful programs that assist the computer by performing useful
functions (housekeeping functions) like backing up disk or scanning/cleaning viruses
or arranging information etc.
Utility software is generally called as Application oriented ready-made system
programs.
Some of the important utilities are: Text Editor, Backup Utility, Compression Utility,
Disk defragmenter, Antivirus Software.
Linux is a free and open-source family of operating systems that is resilient and
flexible.
It acts as the basis for a variety of devices, such embedded systems, cell phones,
servers, and personal computers.
Linux is well-known for its reliability, safety, and flexibility, allows users to
customize and improve their environment to suit specific needs.
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.
Teamwork in development was encouraged with the initial release of the Linux
kernel, which attracted developers and enthusiasts globally quickly.
Various open-source software packages integrated with the Linux kernel created fully
operational operating systems, occasionally referred to as Linux distributions.
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.
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.
Multiuser capability: Multiple users can access the same system resources like
memory, hard disk, etc. But they must use different terminals to operate.
Multitasking: More than one function can be performed simultaneously by
dividing the CPU time intelligently.
Portability: Portability doesn't mean it is smaller in file size or can be carried in
pen drives or memory cards. It means that it supports different types of hardware.
Security: It provides security in three ways namely authenticating (by assigning
password and login ID), authorization (by assigning permission to read, write and
execute) and encryption (converts file into an unreadable format).
Graphical User Interface (X Window system): Linux is command line-based
OS but it can be converted to GUI based by installing packages.
Application support: It has its own software repository from where users can
download and install many applications.
File System: Provides hierarchical file system in which files and directories are
arranged.
Open Source: Linux code is freely available to all and is a community-based
development project.
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.
Types of shells:
The Bourne Shell (sh)
The C Shell (csh)
The Korn Shell (ksh)
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.