0% found this document useful (0 votes)
13 views59 pages

OS Module1 Winter 24 25

The document outlines the course BCSE303L - Operating Systems, detailing its prerequisites, evaluation methods, and course outcomes. It covers fundamental concepts of operating systems, including their functionality, design issues, and various structuring methods such as monolithic, layered, modular, and micro-kernel models. Additionally, it discusses the roles of operating systems in managing resources, providing services, and ensuring security and efficiency.

Uploaded by

aaryamanoj09
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)
13 views59 pages

OS Module1 Winter 24 25

The document outlines the course BCSE303L - Operating Systems, detailing its prerequisites, evaluation methods, and course outcomes. It covers fundamental concepts of operating systems, including their functionality, design issues, and various structuring methods such as monolithic, layered, modular, and micro-kernel models. Additionally, it discusses the roles of operating systems in managing resources, providing services, and ensuring security and efficiency.

Uploaded by

aaryamanoj09
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/ 59

BCSE303L - Operating Systems

Pre-requisite: Nil
Theory Hours: 3 / week
Credits: 3

Mode of Evaluation: CAT, Assignment, Quiz, FAT

Dr. P. Anandan
Cabin: AB3, 1st Floor, Room No. 111,
Cabin No. 1

Dr.P.Anandan 1
• Discussion on mode of evaluation
• DOs and DON’Ts
• Discussion on Course Outcomes and Syllabus

Dr.P.Anandan 2
Theory
CAT1 - 15%
CAT2 – 15%
DA1 – 10%
DA2 – 10%
DA3 – 10%

Dr.P.Anandan 3
Course Outcomes
On completion of this course, student should be able to:
1. Interpret the evolution of OS functionality, structures,
layers and apply various types of system calls of various
process states.
2. Design scheduling algorithms to compute and compare
various scheduling criteria.
3. Apply and analyze communication between inter process
and synchronization techniques.
4. Implement page replacement algorithms, memory
management problems and segmentation.
5. Differentiate the file systems for applying different
allocation, access technique, representing virtualization
and providing protection and security to OS.

Dr.P.Anandan 4
Text books

• Abraham Silberschatz, Peter B. Galvin, Greg Gagne,


“Operating System Concepts”, 2018, 10th Edition, Wiley,
United States.
• William Stallings, “Operating Systems: Internals and Design
Principles”, 2018, 9th Edition, Pearson, United Kingdom.

Dr.P.Anandan 5
Module:1 Introduction

Introduction to OS: Functionality of OS - OS design


issues – Structuring methods (monolithic, layered,
modular, micro-kernel models) - Abstractions,
processes, resources - Influence of security,
networking, and multimedia.

Dr.P.Anandan 6
Introduction

Is Operating System Hardware or Software?

Dr.P.Anandan 7
Introduction

Software..

Dr.P.Anandan 8
Introduction

Is it mandatory to have operating system in


computers?

Dr.P.Anandan 9
Introduction
When the first electronic computer was developed in 1940, it was
created without any operating system. In early times, users have full
access to the computer machine and write a program for each task in
absolute machine language.

After 1956, OS allows the user to communicate with the computer


without knowing how to speak the computer's language. Without an
operating system, a computer is useless.

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.

(Input/Output system of General Motors and North American


Aviation)

Dr.P.Anandan 10
Introduction
What is an Operating System?

Dr.P.Anandan 11
Introduction contd..
• A program that acts as an intermediary (Interface)
between a user of a computer and the computer
hardware. (Actually, we can communicate
directly with the hardware even if this
intermediate is not there, because hardware only
needs a set of electrical pulses)
• Operating system goals:
– Execute user programs and make solving user
problems easier
– Make the computer system convenient to use
– Use the computer hardware in an efficient manner

Dr.P.Anandan 12
Introduction contd..

Dr.P.Anandan 13
Introduction contd..
OS is an integrated set of programs that manages various hardware
resources such as processor, memory, I/O Devices, Communication
devices and overall operations of a computer system

Dr.P.Anandan 14
Introduction contd..

Dr.P.Anandan 15
Introduction contd..
• The kernel is the essential foundation of a computer's
operating system (OS). It is the core that provides basic
services for all other parts of the OS. (Allocate
resources for the user program)

• Other than Kernel which runs in background


– a system program (Example: Compiler, DBMS)
– an application program (Example: word).

Dr.P.Anandan 16
Functionality of OS
An operating system has three main functions:
1. Manage the computer’s resources, such as the
central processing unit, memory, disk drives,
and printers
2. Establish a user interface
3. Execute and provide services for application
softwares.

Dr.P.Anandan 17
OS services to the system
• Security:
- The operating system uses password protection to
protect user data and it also prevents unauthorized
access to the same.

• Control over system performance:


- Monitors overall system health to help improve
performance by recording the response time
between service requests and system response.

Dr.P.Anandan 18
• Error detecting aids
- The operating system constantly monitors the
system to detect errors and avoid the malfunctioning
of a computer system.

• Memory Management:
- The operating system manages the Primary Memory
or Main Memory.
- Main memory is made up of a large array of bytes
where each byte is assigned with 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.

Dr.P.Anandan 19
• Processor Management:
– Keeps track of the status of processes (Process
Life Cycle)
– 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. (Process
Scheduling)

• Job accounting:
– Operating system Keeps track of time and
resources used by various tasks and users.
– Ex: Chrome 20% CPU, 40% Memory, 1% Disk
etc.

Dr.P.Anandan 20
• Device Management:
– An OS manages device communication (Input /
Output controller) via their respective drivers.
– Allocates devices in an efficient way. De allocates
devices when they are no longer required. Ex: Playing
music and word document editor.
• File Management:
– A file system is organized into directories for efficient
or easy navigation and usage.
– It keeps track of where information is stored, user
access settings.

Dr.P.Anandan 21
OS services to the users
• Program Execution: The Operating System is
responsible for the execution of all types of programs
whether it be user programs or system programs.

• Handling Input / Output Operations: The Operating


System is responsible for handling all sorts of
inputs/outputs, i.e, from the keyboard, mouse, etc.

• Error Detection and Handling: The Operating System


is responsible for the detection of any type of errors or
bugs that can occur during any task.

Dr.P.Anandan 22
• Resource Allocation:
The Operating System ensures the proper use of all
the resources available by deciding which resource to
be used by whom for how much time.

• Accounting:
This service of the operating system keeps track of
which users are using how much and what kinds of
computer resources have been used for accounting or
simply to accumulate usage statistics.

Dr.P.Anandan 23
OS Design Issues / OS Design goals
• There are many problems that can occur while
designing and implementing an operating system.
• The important issues related to Operating system
are
➢ Efficiency
➢ Robustness
➢ Portability
➢ Performance
➢ Scalability
➢ Reliability
➢ Synchronization
➢ Security

Dr.P.Anandan 24
OS Design Issues cont..
Efficiency: Most I/O devices are slow compared to
main memory (and the CPU)
• Use of multiprogramming allows for some
processes to be waiting on I/O while another
process executes.
• Often, I/O still cannot keep up with processor
speed.

Dr.P.Anandan 25
OS Design Issues cont..
Robustness:
• It is the property of systems that enables them to
survive unforeseen or unusual circumstances.
• It is the ability of a computer system to cope with
errors during execution and cope with erroneous
input.
• Formal techniques, such as fuzz testing, are
essential to showing robustness since this type of
testing involves invalid or unexpected inputs.

Dr.P.Anandan 26
OS Design Issues cont..
Portability:
Portability is the ability of an application to run
properly in a different platform to the one it was
designed for, with little or no modification.

Dr.P.Anandan 27
OS Design Issues cont..
Performance:
• Performance issues can be caused due to software
updates, corrupt apps or drivers, or a hardware
failure.
• The performance of computer hardware typically
increases monotonically with time.
• The rate at which software performance improves is
usually very slow compared to that of hardware.
• In fact, there are few software whose performance
has get worse consistently with time.

Dr.P.Anandan 28
OS Design Issues cont..
Scalability: Scalability is the measure of a system's
ability to increase or decrease its performance in
response to changes in application and system
processing demands.

Reliability: The capability of hardware or software to


perform as the user expects and to do so consistently
throughout a specified system lifetime, without
failures.

Dr.P.Anandan 29
OS Design Issues cont..
Synchronization is the way by which
processes that share the same memory space
are managed in an operating system. Processes
requires coordination to achieve synchronization.
Process must reach a common synchronization
point before they can continue.

Security refers to providing a protection system


to computer system resources such as CPU,
memory, disk, software programs and most
importantly data/information stored in the
computer system.

Dr.P.Anandan 30
Structuring methods

Dr.P.Anandan 31
Structuring methods
Operating system can be implemented with the help of
various structures

1. Monolithic
2. Layered
3. Modular
4. Micro-kernel models

Dr.P.Anandan 32
1. Monolithic Structure
– A monolithic kernel is an operating system
architecture where the entire operating system is
working in kernel space.
– File management, device management, process
management, and memory management are all
controlled directly from the kernel.
– It is an old type of operating system. They were used
in banks to do small tasks.

Dr.P.Anandan 33
– Monolithic operating systems have three major layers:
i. Application layer
ii. Monolithic kernel
iii.Hardware layer
– Every application in these operating systems has its
own address space.
– The kernel manages the operating system services,
including the file system, memory manager, and CPU
scheduler.

Dr.P.Anandan 34
• Kernel mode of the operating system is called privileged mode.
Privileged Mode is a password-protected mode that can be only
accessed by the authorized user.
• Users who lack most privileges are defined as unprivileged. Generally,
the user mode of the operating system is called unprivileged mode

Dr.P.Anandan 35
Advantages
– This structure is easy and simple. The kernel contains
all the components required for processing.
– All the components may interact directly with each other
and with the kernel.
Disadvantages
– Monolithic OS has more tendency to generate errors
and bugs.
– It is very difficult to add and remove features from a
monolithic operating system. All the code must be
modified and recompiled to add or remove a feature.

Dr.P.Anandan 36
2. Layered Structure
• In this structure, the OS is broken into number of layers
(levels). The bottom layer (layer 1) is the hardware and
the topmost layer (layer N) is the user interface.

Dr.P.Anandan 37
• These layers are so designed that each layer uses
the functions of the lower-level layers only.

• It simplifies the debugging process as if lower-level


layers are debugged, and an error occurs during
debugging. The error must be on that layer only as
the lower-level layers have already been debugged.

Dr.P.Anandan 38
Advantages:
– It is very easy to perform debugging.
– Layering makes it easier to enhance the operating
system as a layer that can be changed easily
without affecting the other layers.
Disadvantages:
– The main disadvantage of this structure is that at
each layer, the data needs to be modified and
passed. It adds overhead to the system.

Dr.P.Anandan 39
3. Modular Structure
• Different processes are isolated from one another. This
allows the operating system to keep track of each
process separately and manage them more effectively.
• Additionally, modularity allows for easier debugging and
maintenance as changes to one component can be
made without affecting the others.
• Instead of manipulating information in the context of an
entire environment, the operating-system module
manages information specific to one application. In any
application, you can run it or quit it.

Dr.P.Anandan 40
• The modularized approach is pretty similar to the
layered approach but the freedom here is that each
module is independent and is allowed to contact any
other module as per requirement.

Dr.P.Anandan 41
Advantages
• Efficient
• Easy to maintain
• Easy to debug and update

Disadvantages
• It may lose stability
• Less security

Dr.P.Anandan 42
4. Micro Kernel Structure
• Kernel is the central component of an OS that handles
system resources.
• It also acts as a bridge between the computer's
application and hardware.
• When an OS is loaded, the kernel is the first
component that loads into memory and rests there until
the OS is shut down.
• It is in-charge of various activities, including task
management, disk management, and memory
management.

Dr.P.Anandan 43
• This structure designs the operating system by
removing all non-essential components from the kernel
and implementing them as system and user programs.
This result in a smaller kernel called the micro-kernel.
• All new services need to be added to user space and
does not require the kernel to be modified. Thus it is
more secure and reliable as if a service fails then rest
of the operating system remains untouched.
• Mac OS is an example of this type of OS.

Dr.P.Anandan 44
Dr.P.Anandan 45
Four Components of a Micro Kernel

Dr.P.Anandan 46
• Computer system can be divided into four components:
– Hardware – provides basic computing resources
• CPU, Memory (Main (Access time is fast) and Secondary
Memory (Access time is Slow compared to MM)), I/O
devices
– Operating system
• Controls (Hardware) and coordinates the application, like
synchronization when users work on more than one
application at a time (PPT and Listening Music) use of
hardware among various applications and users (Helps
the user job done)
– Application programs – define the ways in which
the system resources are used to solve the
computing problems of the users
• Word processors, compilers, web browsers, database
systems, video games (these programs are on top of OS
which makes the users work more easy, there can be N
number of applications)
– Users
• People, machines, other computers

Dr.P.Anandan 47
Advantages:
• It makes the operating system portable to various
platforms.
• As microkernels are small, these can be tested
effectively.
Disadvantages:
• Increased level of inter module communication
degrades system performance.

Dr.P.Anandan 48
Abstractions, processes, and resources

Dr.P.Anandan 49
Abstractions
• Abstraction hides lower level details and provides
a set of higher-level functions.
• It is a way of hiding the working details of a
subsystem.

Some OS abstractions are:


Process: Process means any program is in
execution.
Thread : Thread means a segment of a process.
Memory Management: The task of subdividing the
memory among different processes

Dr.P.Anandan 50
Providing abstraction via system calls

Application
System Calls: fork(), wait(), read(), open(), write(), mkdir(), kill() ...

Operating
System
Process
Device Mgmt
Mgmt File System Network
Protection Comm. Security
Kernel

CPU Memory
Video Card Network
Monitor Disk Printer
51
Processes
• In the Operating System, a Process is something
that is currently under execution. So, an active
program can be called a Process.
• For example, when you want to search something
on web, then you start a browser.
• This is denoted by process state. It can be ready,
waiting, running, etc.

Dr.P.Anandan 52
Resources
• Typical resources include the CPU, computer
memory, file storage, I/O devices, and network
connections.
• Operating system manages the allocation of those
resources among other programs.
• Resource Management tasks include scheduling
resource use to avoid conflicts between programs.
Some major activities of an OS with respect to
resource management are:
➢ The OS manages all kinds of resources using
schedulers.
➢ CPU scheduling algorithms are employed for better
utilization of CPU

Dr.P.Anandan 53
Influence of security,
networking, and multimedia

An operating system (OS) is basically a collection of


software that manages computer hardware resources and
provides common services for computer programs.

Dr.P.Anandan 54
Security
• Operating systems security plays a primitive role in
protecting memory, files, user authentication and data
access protection.
• It is important to keep a balance since severe security
measures can limit the user-friendliness and smooth
performance of the system.
• Hence, system designers have to ensure effective
performance without compromising on security.

Dr.P.Anandan 55
Networking
• Network Operating System (NOS) runs on a server
and gives the server the capability to manage data,
users, groups, security, applications, and other
networking functions.
• The basic purpose of the NOS is to allow shared file
and printer access among multiple computers in a
network, typically a local area network (LAN).
Advantages:
• Security is server managed.
• Upgradation of new technologies and hardware can be
easily integrated into the system.
Disadvantages:
• High cost of buying and running a server.
• Regular maintenance and updates are required.

Dr.P.Anandan 56
Multimedia
• Multimedia Operating Systems are the operating
systems that can deal with the multimedia files.
• Multimedia files are different from the traditional files
(e.g., texts). They need special considerations for
process management, secondary storage management,
file management, and so on.
• Video on demand requires huge servers. The system
has to be able to access, say, 1000 disks, and distribute
signals to the distribution network at high speed in real
time.
• The only way for an operating system to be able to do
this is to reserve bandwidth, CPU, memory, etc. ahead
of time.

Dr.P.Anandan 57
• Uncompressed movies are too big to transmit. Thus, the
system needs a compression (encoding) algorithm and a
decompression (decoding) algorithm.
• An operating system whose primary job is serving videos
would differ from a traditional operating system in three
ways.
➢ Process scheduling
➢ File system
➢ Disk scheduling

Dr.P.Anandan 58
End of Module1

Dr.P.Anandan 59

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy