0% found this document useful (0 votes)
22 views39 pages

OS - Operating System

Uploaded by

seohaseeb123
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)
22 views39 pages

OS - Operating System

Uploaded by

seohaseeb123
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/ 39

OS – Operating System

Operating System
• An operating system is the most important software on a computer. It
is responsible for managing the computer's hardware and software
resources, and providing a platform for application programs to run
on.
• The operating system acts as an intermediary between the user and
the computer hardware. It hides the complexity of the hardware from
the user, and provides a simple and easy-to-use interface for
interacting with the computer.
Operating System

▪ It’s a system software that allows a user to run other applications on a


computing device
▪ 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.
Working Of OS – Example 1
Here is an example of how the operating system acts as an
intermediary between the user and the computer hardware:
When the user clicks on an icon to open a file, the operating system
intercepts the click and loads the file into memory. The operating
system then provides the file to the application program that the
user is using. The application program can then read the file and
display it to the user.
The user does not need to know how the computer hardware works
in order to open a file. The operating system takes care of all the low
-level details, such as reading the file from the disk and loading it into
memory.
Example 2
Here is another example:
When the user clicks on a link in a web browser, the operating system
intercepts the click and opens the web browser application. The web
browser application then sends a request to the web server for the page that
the user wants to visit. The web server sends the page back to the web
browser application, which then displays it to the user.
The user does not need to know how the web browser application works or
how the web server works in order to open a web page. The operating
system takes care of all the communication between the web browser
application and the web server.
What d o operating systems do?
• Booting:
The process of starting up a computer and loading the operating system
into memory.
• Memory management:
The process of allocating and managing memory for running programs.
• Data security:
The process of protecting data from unauthorized
access, use, disclosure, disruption, modification, or destruction.
• Drive/disk management:
The process of managing computer drives and dividing disks into
partitions.
What d o operating systems do?
• User interface:
The part of the operating system that allows users to interact with the
computer.
• Process management:
The process of managing the execution of programs, including allocating
resources and scheduling them to run on the CPU.
• Allocation of resources:
The process of allocating system resources to programs, such as CPU
time, memory, and disk space.
Here are some brief explanations of each function:
Booting:
When you turn on a computer, the BIOS or UEFI (Unified Extensible Firmware Interface) firmware starts the
booting process. This process loads the operating system into memory. The operating system then takes control
of the computer and starts up the user interface.
Memory management:
The operating system is responsible for allocating memory to running programs. When a program needs to use
memory, it requests memory from the operating system. The operating system then allocates memory to the
program from the available memory pool.
Data security:
The operating system is responsible for protecting data from unauthorized access, use, disclosure, disruption,
modification, or destruction. The operating system may use various security measures to protect data, such as
encryption and firewalls.
Loading and execution:
When you start a program, the operating system loads the program into memory and then starts executing the
program. The operating system continues to execute the program until it finishes running.
Encryption is the process of converting data into a format that can only be read by authorized
individuals. It is one of the most effective ways to protect data from unauthorized access.
Encryption can be used to protect data at rest (stored on a disk or other storage device) or in
transit (being sent over a network).
Firewalls are network security devices that monitor and filter incoming and outgoing network
traffic. Firewalls can be used to block malicious traffic and protect computers from attack.
Operating systems typically include built-in encryption and firewall features.

For example, Windows includes BitLocker encryption and the Windows Defender Firewall.
macOS includes FileVault encryption and the macOS Firewall.
In addition to the built-in security features provided by the operating system, users can also
install additional security software, such as antivirus programs and anti-malware programs.
Drive/disk management:
The operating system is responsible for managing computer drives and dividing disks into partitions. The
operating system also provides file management features, such as creating, deleting, and modifying files.
User interface:
The user interface is the part of the operating system that allows users to interact with the computer. The user
interface may be a graphical user interface (GUI) or a command-line interface (CLI).
Process management:
The operating system is responsible for managing the execution of programs. This includes allocating resources
to programs, scheduling them to run on the CPU, and ensuring that they run safely and correctly.
Allocation of resources:
The operating system is responsible for allocating system resources to programs, such as CPU time, memory,
and disk space. The operating system must ensure that all programs have the resources they need to run, but it
must also prevent programs from using too many resources and harming other programs.
These are just some of the essential functions of an operating system. Operating systems are complex pieces of
software that perform many other important tasks, such as networking, device management, and error handling.
P rovid ing a U ser Interface
When you work on a computer; you see and use a set of items on the screen. These items
are called the user interface.

The two most common types of user interfaces are:

1. Graphical User Interfaces (GUI):


• In Graphical User Interfaces you use a mouse to work with graphical objects such as
menus, icons, buttons, and other tools. For example: Windows provide GUI

• These graphical tools represent different types of commands. The GUI enables you to
issue commands to the computer by using visual objects instead of typing
commands. This is one of the key advantages of a graphical user interface; it frees
you from memorizing and typing text commands.
A graphical user interface (GUI) is a way of interacting with a computer
using images and objects instead of text commands

GUIs are typically easier to use for beginners than command-line


interfaces (CLIs), because they are more intuitive and require less
knowledge of the underlying system

GUIs typically use a variety of visual elements, such as windows, icons,


menus, and buttons, to allow users to interact with the computer

Users can use the mouse or keyboard to click on buttons, drag and drop
icons, and type text into fields
GUIs are commonly used in operating systems, web browsers, and
other software applications
GUIs are commonly used in operating systems, web browsers, and other software applications
Some examples of GUI operating systems include Windows, macOS, and Linux. Some examples of GUI web
browsers include Chrome, Firefox, and Edge.
Some examples of GUI software applications include Microsoft Office, Adobe Photoshop, and VLC Media Player
2 Command-Line Interfaces
• In command line interface, you write commands rather than graphical
objects to execute tasks.

• Older operating systems such as MS-DOS and some current versions of


UNIX and Linux, provide command-line interface.
A command-line interface (CLI) is a way of interacting with a computer
using text commands. CLIs are typically more difficult to use for
beginners than GUIs, because they require users to know the specific
commands to execute in order to perform desired tasks

CLIs typically use a text-based interface, such as a terminal window, to


allow users to enter and receive commands. Users can type commands
into the terminal window and press Enter to execute them.
CLIs are commonly used for system administration tasks, such as
managing files and folders, configuring network settings, and
troubleshooting problems. CLIs are also used by software developers to
create and test new software applications

Some examples of CLI operating systems include Linux and macOS


A d vantages and D isad vantages of G U Is and C LIs
GUIs
Advantages:
Easy to use for beginners
More intuitive than CLIs
Disadvantages:
Can be slower than CLIs
Can be less powerful than CLIs
Can be more resource-intensive than CLIs
A d vantages and D isad vantages of G U Is and C LIs
CLIs
Advantages
Faster than GUIs
More powerful than GUIs
Less resource-intensive than GUIs
Disadvantages
Difficult to use for beginners
Less intuitive than GUIs
Requires knowledge of specific commands
Which interface is better for user?
The best interface for you depends on your needs and preferences. If
you are a beginner, it is generally recommended to start with a GUI.
GUIs are easier to use and more intuitive than CLIs

However, if you are a power user or if you need to perform system


administration tasks, you may find that a CLI is more efficient and
powerful. CLIs are also less resource-intensive than GUIs, so they can
be a good choice for older computers or devices with limited
resources.
G U I C an b e more resou rce-intensive th an C LIs- H ow ??

GUIs use a variety of resources, such as CPU time, memory, and disk space. CPU
time is needed to render the graphical elements of the user interface and to handle
user input. Memory is needed to store the graphical elements and the state of the user
interface. Disk space is needed to store the GUI software itself, as well as any fonts,
images, and other resources that the GUI needs.

CLIs, on the other hand, are much simpler and less resource-intensive. CLIs
typically only need a small amount of CPU time and memory to run. CLIs also do
not require any disk space
Examples of Operating Systems

▪ Windows
▪ Linux

▪ Mac OS
▪ Ubuntu
▪ Android

▪ iOS
G oals of Operating System

▪ Operating System Goals


▪ Execute user programs.
▪ Make solving user problems easier.
▪ Make the computer system convenient to use.
▪ Use the computer hardware and resources in an efficient manner.
Single U ser and M u lti U ser Operating System
A multi-user operating system allows multiple users to access a computer
system concurrently.
Single-user operating systems, as opposed to a multi-user operating
system, are usable by a single user at a time.
Time-sharing system can be classified as multi-user systems as they enable
a multiple user access to a computer through the sharing of time.
M ajor F u nctions of Operating System

• Memory management
• Process management
• File management
• Standard means of communication between User and
Computer
M emory M anagement
• Memory management refers to management of Primary Memory or Main
Memory. Main memory is a large array of words or bytes where each
word or byte has its own address
• Main memory provides a fast storage that can be accessed directly by the
CPU
• For a program to be executed, it must in the main memory
• An Operating System does the following activities for memory
management
M emory M anagement

• Keeps tracks of primary memory, i.e., what part of it are in use by whom,
what part are not in use
• In multiprogramming, the OS decides which process will get memory
when and how much.
• Allocates the memory when a process requests it to do so.
• De-allocates the memory when a process no longer needs it or has been
terminated
P rocess M anagement

• In multiprogramming environment, the OS decides which process gets the


processor when and for how much time. This function is called process
scheduling
• An Operating System does the following activities for processor
management
• Keeps tracks of processor and status of process. The program responsible
for this task is known as traffic controller
• Allocates the processor (CPU) to a process.
• De-allocates processor when a process is no longer required
F ile M anagement

• A file system is normally organized into directories for easy navigation and
usage.
• These directories may contain files and other directions
• An Operating System does the following activities for file management −
• Keeps track of information, location, uses, status etc. The collective
facilities are often known as file system.
• Decides who gets the resources.
• Allocates the resources.
• De-allocates the resources
Operating System Services

▪ User Interface
▪ Allows the user to interact with the
computer.
▪ Command line interface (Terminal)
▪ Graphical user interface
▪ Program Execution
▪ Load the program into memory
▪ Execute the program.
T ypes of Operating System

▪ Batch Operating System


▪ Multitasking OS

▪ Multiprogramming OS
▪ Multiprocessing OS
▪ Distributed OS
B atch 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.

▪ System will execute the jobs one by one.


M u ltiprogramming
0
▪ The capability of running multiple programs by the CPU. Main Memory
(RAM)
▪ Multiprogramming increases the CPU utilization by organizing jobs (code Job1
and data) so that the CPU always has one to execute.

Job2

Job3

Job4
512mb
M u ltitasking (T ime Sh aring)

▪ CPU executes multiple jobs by switching among them.


▪ Very fast switching.

▪ A time sharing operating system allows many users to share the computer
simultaneously.
• Just to make it easy to remember, both multiprogramming and multitasking
operating systems are (CPU) time sharing systems. However, while in
multiprogramming (older OSs) one program as a whole keeps running until it
blocks, in multitasking (modern OSs) time sharing is best manifested because
each running process takes only a fair quantum of the CPU time.

T h ings to
rememb er!
M ultiprocessing

▪ Multiprocessing is the use of two or more central processing units (CPUs) within a single
computer system.

▪ The term also refers to the ability of a system to support more than one processor or the
ability to allocate tasks between them.
▪ I/O Operations
▪ File system manipulation
▪ Creation, deletion, search
▪ Resource Allocation
B IOS(B asic Input Output System)

▪ A firmware designed to be executed first when computer is turned on


▪ Function Is to identify , test and initialize system devices like hard disk .

▪ BIOS sets the machine in a state so that the operating system can be loaded , executed
and given control of a PC.
Important T erms and D efinitions

▪ Bootloader
▪ Called by BIOS
▪ Initializes the OS during start up.
▪ It is stored in the ROM.
▪ It must know how to load the OS and start executing that system.
▪ It must locate and load OS kernel into memory.
▪ Process
▪ In computing, a process is an instance of a computer program that is being executed.
It contains the program code and its activity.

▪ Kernel
▪ A kernel is the central part of an operating system.

You might also like