Operating System
Operating System
Operating System
Mr. MLELI
What is operating system?
An operating system is the most important software that runs on a
computer. It manages the computer's memory and processes, as well as
all of its software and hardware. It also allows you to communicate with
the computer without knowing how to speak the computer's
language. Without an operating system, a computer is useless.
Your computer's operating system (OS) manages all of
the software and hardware on the computer. Most of the time, there are
several different computer programs running at the same time, and they
all need to access your computer's central processing unit
(CPU), memory, and storage. The operating system coordinates all of
this to make sure each program gets what it needs.
It acts as an intermediary between a user and computer hardware and
provides an environment required to execute different programs
efficiently.
Operating System cont.…….
Operating systems usually come pre-loaded on any computer you buy. Most
people use the operating system that comes with their computer, but it's
possible to upgrade or even change operating systems. The three most
common operating systems for personal computers are Microsoft
Windows, macOS, and Linux.
Modern operating systems use a graphical user interface (GUI) . A GUI lets
you use your mouse to click icons, buttons, and menus, and everything is
clearly displayed on the screen using a combination of graphics and text.
Functions of Operating System
I. Processor Management: In a multi-programming environment,
the OS decides the order in which processes have access to the processor,
and how much processing time each process has. This function of OS is
called Process Scheduling. An Operating System performs the following
activities for Processor Management.
An operating system manages the processor’s work by allocating
various jobs to it and ensuring that each process receives enough time from
the processor to function properly.
Keeps track of the status of processes. The program which
performs this task is known as a traffic controller. Allocates the CPU that is a
processor to a process. De-allocates processor when a process is no
longer required.
II. Memory Management: The operating system manages the
Primary Memory or Main Memory. Main memory is made up of a
large array of bytes or words where each byte or word is assigned a
certain address. Main memory is fast storage and it can be
accessed directly by the CPU. For a program to be executed, it should
be first loaded in the main memory. An operating system manages
the allocation and deallocation of memory to various processes and
ensures that the other process does not consume the memory allocated
to one process. An Operating System performs the following activities
for Memory Management.
It keeps track of primary memory, i.e., which bytes of memory are used by
which user program
In multiprogramming, the OS decides the order in which processes are granted
memory access, and for how long.
It Allocates the memory to a process when the process requests it and
deallocates the memory when the process has terminated.
III. Device Management: An OS manages device
communication via its respective drivers. It performs the following
activities for device management. Keeps track of all devices
connected to the system. designates a program responsible for every
device known as the Input/Output controller. Decide which process
gets access to a certain device and for how long. Allocates devices
effectively and efficiently. Deallocates devices when they are no
longer required. There are various input and output devices. an OS
controls the working of these input-output devices. It receives
the requests from these devices, performs a specific task, and
communicates back to the requesting process.
• File Management: A file system is organized into directories for
efficient or easy navigation and usage. These directories may contain
other directories and other files. An Operating System carries out the
following file management activities. It keeps track of where
information is stored, user access settings, the status of every file, and
more. These facilities are collectively known as the file system. An OS
keeps track of information regarding the creation, deletion, transfer,
copy, and storage of files in an organized way. It also maintains the
integrity of the data stored in these files, including the file directory
structure, by protecting against unauthorized access.
Functions of Operating System Cont.…..
V. Security: The operating system uses password protection to protect
user data and similar other techniques. it also prevents unauthorized
access to programs and user data. The operating system provides
various techniques which assure the integrity and confidentiality of
user data. Following security measures are used to protect user data;
Protection against unauthorized access through login.
Protection against intrusion by keeping Firefall active.
Protecting the system memory against malicious access.
Displaying messages related to system vulnerabilities
Functions of Operating System Cont.…..
VI. Error Detection: The operating system constantly monitors the
system to detect errors and avoid malfunctioning computer
systems. From time to time, the operating system checks the system
for any external threat or malicious software activity. It also checks
the hardware for any type of damage. This process displays several
alerts to the user so that the appropriate action can be taken against
any damage caused to the system.
VII. Job Scheduling: In a multitasking operating system where multiple
programs run simultaneously, the operating system determines which
applications should run in which order and how time should be
allocated to each application.
Components of Operating System
In order for the operating system to perform the functions mentioned above, the
operating system needs two core components:
I. Shell
II. Kernel
Shell
Shell handles user interactions. It is the outermost layer of the operating system
and manages the interaction between user and operating system. It also serves as
the user interface, allowing the user to interact with the operating system by
interpreting their commands and facilitating communication with the kernel.
It allowing the user to interact with OS by;
Components of Operating System Cont.…
I. Prompting the user to give input
II. Interpreting the input for the operating system
III. Handling the output from the operating system
Shell provides a way to communicate with the operating system by
either taking the input from the user or the shell script. A shell script is a
sequence of system commands that are stored in a file.
Components of Operating System Cont.…
Components of Operating System Cont.…
Kernel
The kernel is the core component of an operating system which acts as an
interface between applications, and the data is processed at the hardware level.
The kernel is the central component that manages system resources and
provides essential services
When an OS is loaded into memory, the kernel is loaded first and remains in
memory until the OS is shut down. After that, the kernel provides and
manages the computer resources and allows other programs to run and use
these resources. The kernel also sets up the memory address space for
applications, loads the files with application code into memory, and sets up the
execution stack for programs.
Components of Operating System Cont.…
The kernel is responsible for performing the following tasks:
I. Input-Output management
II. Memory Management
III. Process Management for application execution.
IV. Device Management
V. System calls control
NB: Shell and Kernel together they form the foundation of an operating
system’s functionality
Components of Operating System Cont.…
There are various components of an Operating System to
perform well defined tasks. Though most of the
Operating Systems differ in structure but logically they
have similar components. Each component must be a
well-defined portion of a system that appropriately
describes the functions, inputs, and outputs.
Components of Operating System Cont.…
Process Management
A process is program or a fraction of a program that is
loaded in main memory. A process needs certain
resources including CPU time, Memory, Files, and I/O
devices to accomplish its task. The process management
component manages the multiple processes running
simultaneously on the Operating System.
Components of Operating System Cont.…
I/O Device Management
One of the purposes of an operating system is to hide the
peculiarities of specific hardware devices from the user.
I/O Device Management provides an abstract level of
H/W devices and keep the details from applications to
ensure proper use of devices, to prevent errors, and to
provide users with convenient and efficient programming
environment.
Components of Operating System Cont.…
File Management
File management is one of the most visible services of an
operating system. Computers can store information in
several different physical forms; magnetic tape, disk, and
drum are the most common forms.
A file is defined as a set of correlated information and it
is defined by the creator of the file. Mostly files represent
data, source and object forms, and programs. Data files
can be of any type like alphabetic, numeric, and
alphanumeric.
Components of Operating System Cont.…
Network Management
The definition of network management is often broad, as network
management involves several different components. Network management
is the process of managing and administering a computer network. A
computer network is a collection of various types of computers connected
with each other.
Network management comprises fault analysis, maintaining the quality of
service, provisioning of networks, and performance management. Some
activities are;
i. Network administration
ii. Network maintenance
iii. Network operation
iv. Network provisioning
v. Network security
Components of Operating System Cont.…
Main Memory Management
Memory is a large array of words or bytes, each with its own address. It is
a repository of quickly accessible data shared by the CPU and I/O devices.
Main memory is a volatile storage device which means it loses its contents
in the case of system failure or as soon as system power goes down.
The operating system is responsible for the following activities in
connections with memory management:
i. Keep track of which parts of memory are currently being used and by
whom.
ii. Decide which processes to load when memory space becomes
available.
iii. Allocate and deallocate memory space as needed.
Components of Operating System Cont.…
Secondary Storage Management
The main purpose of a computer system is to execute programs. These
programs, together with the data they access, must be in main memory during
execution. Since the main memory is too small to permanently accommodate all
data and program, the computer system must provide secondary storage to
backup main memory.
Most modern computer systems use disks as the principle on-line storage
medium, for both programs and data. Most programs, like compilers,
assemblers, sort routines, editors, formatters, and so on, are stored on the disk
until loaded into memory, and then use the disk as both the source and
destination of their processing.
The operating system is responsible for the following activities in connection
with disk management:
i. Free space management
ii. Storage allocation
Components of Operating System Cont.…
Security Management
The operating system is primarily responsible for all task
and activities happen in the computer system. The
various processes in an operating system must be
protected from each other’s activities. For that purpose,
various mechanisms which can be used to ensure that
the files, memory segment, cpu and other resources can
be operated on only by those processes that have gained
proper authorization from the operating system.
Components of Operating System Cont.…
Command Interpreter System
One of the most important component of an operating
system is its command interpreter. The command
interpreter is the primary interface between the user and
the rest of the system.
Command Interpreter System executes a user command
by calling one or more number of underlying system
programs or system calls.
Types of Operating System
Examples of Batch OS: IBM OS/360, IBM OS/370, IBM OS/390, UNIVAC EXEC
I, BESYS (Batch Environment System), Multics (Multiplexed Information and
Computing Service)etc.
Types of Operating System Cont.…..
Distributed OS
A distributed operating system is a recent advancement in the field of
computer technology and is utilized all over the world that too with great
pace. In a distributed OS, various computers are connected through a
single communication channel.
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 independent computers have their memory unit and CPU and are
known as loosely coupled systems. The system processes can be of
different sizes and can perform different functions. The major benefit of
such a type of operating system is that a user can access files that are not
present on his system but another connected system. In addition, remote
access is available to the systems connected to this network.
Distributed OS Cont.…
• A distributed operating system is an operating system that runs on
multiple machines and allows them to work together as a single,
integrated system. The primary goal of a distributed operating system
is to provide a transparent and efficient environment for users and
applications, despite the underlying complexity of multiple
interconnected machines.
• Unlike traditional operating systems that run on a single machine,
distributed operating systems extend their functionality to a network
of interconnected computers. The primary goal is to provide a unified
and transparent environment for users and applications, despite the
physical distribution of computing resources.
Types of Operating System Cont.…..
Advantages of Distributed OS
I. Failure of one system will not affect the other systems because all
the computers are independent of each other.
II. The load on the host system is reduced.
III. The size of the network is easily scalable as many computers can be
added to the network.
IV. As the workload and resources are shared therefore the calculations
are performed at a higher speed.
V. Data exchange speed is increased with the help of electronic mail.
Types of Operating System Cont.…..
Disadvantages of Distributed OS
I. The setup cost is high.
II. Software used for such systems is highly complex.
III. Failure of the main network will lead to the failure of the whole
system.
Examples of Distributed OS: LOCUS, Plan 9 from Bell Labs, MINIX
3 etc.
Types of Operating System Cont.…..
Multitasking OS
A multitasking operating system is an operating system that allows
multiple tasks or processes to run concurrently on a computer, providing
the illusion that they are executing simultaneously. Multitasking enables
users to perform several tasks concurrently without waiting for one task
to complete before starting another. There are two main types of
multitasking: preemptive multitasking and cooperative multitasking.
Preemptive Multitasking
Preemptive multitasking is a type of multitasking in which the operating
system can interrupt or preempt currently running tasks to give time to
another task. The decision to switch between tasks is typically based on
priorities assigned to different processes or time-slicing mechanisms, where
each process is given a certain amount of time to execute before being
interrupted. This type of multitasking allows the operating system to efficiently
manage multiple tasks and provide the illusion of parallel execution.
In preemptive multitasking, the operating system can interrupt or preempt a
currently running task to give time to another task. The scheduler decides when
to switch between tasks based on priorities and time-slicing. This type of
multitasking is commonly found in modern operating systems. Examples
include;
Preemptive Multitasking Cont.…
1.Microsoft Windows:
Windows operating systems, such as Windows 10, support preemptive
multitasking. The operating system dynamically allocates CPU time to different
processes based on their priority levels. Use preemptive multitasking to manage
multiple processes concurrently.
2.Linux:
Description: Linux is a multitasking operating system that uses a preemptive
scheduler. It efficiently manages multiple processes running concurrently on a
system.
3.macOS:
Description: macOS, the operating system for Apple Mac computers, utilizes
preemptive multitasking to manage and switch between running applications.
Cooperative Multitasking
Cooperative multitasking is a type of multitasking in which multiple tasks or
processes run concurrently, but they voluntarily yield control to the
operating system or other tasks. Unlike preemptive multitasking, where the
operating system can forcefully interrupt a running task to switch to
another, cooperative multitasking relies on the cooperation of tasks to yield
control.
In cooperative multitasking, each task voluntarily gives up control to allow
other tasks to run. This type of multitasking relies on the cooperation of
processes to yield control to the operating system. If a task fails to yield, it
can adversely affect the overall system performance. Cooperative
multitasking was more common in early operating systems but is less
prevalent in modern systems. Examples include;
Cooperative Multitasking Cont.…
ANY QUESTION