Operating Systems Overview and Concepts
Operating Systems Overview and Concepts
21BTIS501-Operating System
Unit
PLD- I
INTRODUCTION
AY 2024-2025 SEM-I
1
MIT School of Computing
Department of Computer Science & Engineering
Unit-I INTRODUCTION
2
MIT School of Computing
Department of Computer Science & Engineering
3
MIT School of Computing
Department of Computer Science & Engineering
Unit-III
PROCESS SYNCHRONIZATION
AND DEADLOCKS
• Background, The Critical-Section Problem, Peterson's
Solution, Synchronization
PLD Hardware, Semaphores,
Classic Problems of Synchronization, Monitors,
Synchronization Example, Atomic Transactions,
Deadlocks, System Model, Deadlock Characterization,
Methods for Handling Deadlocks, Deadlock Prevention,
Deadlock Avoidance, Deadlock Detection, Recovery from
Deadlock
4
MIT School of Computing
Department of Computer Science & Engineering
5
MIT School of Computing
Department of Computer Science & Engineering
OS Introduction
PLD
7
MIT School of Computing
Department of Computer Science & Engineering
8
MIT School of Computing
Department of Computer Science & Engineering
PLD
9
MIT School of Computing
Department of Computer Science & Engineering
2]Operating System:
• It controls & co-ordinates use of hardware among various
application & user.
• It assign different jobs to the hardware part while running a
program.
3]Application Program: It defines the ways in which the system
resources are used to solve the computing problems of the users.
10
MIT School of Computing
Department of Computer Science & Engineering
11
MIT School of Computing
Department of Computer Science & Engineering
• Expensive-
• System Failure-
PLD
• Highly Complex language for programming
• Virus Threats halts the functioning and slows down.
• Fragmentation
14
MIT School of Computing
Department of Computer Science & Engineering
PLD
16
MIT School of Computing
Department of Computer Science & Engineering
PLD
20
MIT School of Computing
Department of Computer Science & Engineering
PLD
PLD
24
MIT School of Computing
Department of Computer Science & Engineering
PLD
27
MIT School of Computing
Department of Computer Science & Engineering
1. Centralized management –
2. Resource sharing –
3. Scalability PLD
4. Security –
5. Remote access –
29
MIT School of Computing
Department of Computer Science & Engineering
1. Complexity –
2. Cost -
3. Security – PLD
4. Compatibility –
5. Maintenance –
30
MIT School of Computing
Department of Computer Science & Engineering
31
MIT School of Computing
Department of Computer Science & Engineering
33
MIT School of Computing
Department of Computer Science & Engineering
4. Absence of standardisation:
5. Hardware dependence:
34
MIT School of Computing
Department of Computer Science & Engineering
35
MIT School of Computing
Department of Computer Science & Engineering
Computer-System Structure
1. Simple Structure
2. Monolithic Structure
3. Layered Structure
4. Microkernel Structure PLD
36
MIT School of Computing
Department of Computer Science & Engineering
1. Simple Structure
• Used very beginning and old Structure
• Not having well designed structure
• EX- MS-DOS
• At BottomBIOS DD i.e HW
• DD accesshw
• PLD
Resident system program DD & HW
• At Top Application Pragram
Residencial system program & Access
HW.
• Interface & levels of functionality are
not separated.
• Used 8088 not support dual mode or not
having protection to hw.
37
MIT School of Computing
Department of Computer Science & Engineering
1. Simple Structure
• Not well design and structured.
• At bottom is ROM BIOS device driver
is nothing but the Hardware
PLD
layer.
• At top is application program is nothing
but the user interface.
• Application program directly access
hardware.
• Ex- MS-DOS
38
MIT School of Computing
Department of Computer Science & Engineering
[Link] Secure
[Link] user application fails all os fails.
[Link] well design and structured.
39
MIT School of Computing
Department of Computer Science & Engineering
2. Monolithic Structure
• Followed by Unix OS
• 1st User
• 2nd Shell, system call,
compiler, interpreter,
PLD system Library.
• 3rd System call interface
to kernel.
• 5th above HW & below
functionality.
• Everything packed in one
level hence called
monolithic structure.
• 5th HW 40
MIT School of Computing
Department of Computer Science & Engineering
2. Monolithic Structure
• This operating system works in the kernel space in
the monolithic system.
• The monolithic kernel is quite fast as the services
such as memory management,
PLD file management,
process scheduling etc.
• A set of primitives or system calls implement all
operating system services such as process
management, concurrency, and memory
management.
• Example Linux, BSDs, Solaris, DOS, OpenVMS
41
MIT School of Computing
Department of Computer Science & Engineering
42
MIT School of Computing
Department of Computer Science & Engineering
43
MIT School of Computing
Department of Computer Science & Engineering
3. Layered Structure
• Divide into Nor of
layers. i.e layer 0
HW…layer N user
PLD interface.
• Broken down
functionality into
separate layer.
• Easy to implements
and design.
• Ex- Windows NT OS
44
MIT School of Computing
Department of Computer Science & Engineering
Layered Structure
• Layered Structure is a type of system structure in
which the different services of the operating
system are split into various
PLD
layers.
• Where each layer has a specific well-defined
task to perform.
• It was created to improve the pre-existing
structures like the Monolithic structure ( UNIX )
and the Simple structure ( MS-DOS ).
• Example – Windows NT operating system
45
MIT School of Computing
Department of Computer Science & Engineering
46
MIT School of Computing
Department of Computer Science & Engineering
47
MIT School of Computing
Department of Computer Science & Engineering
48
MIT School of Computing
Department of Computer Science & Engineering
4. Microkernel Structure
• In microkernel, user services and kernel
services are kept in separate address space.
• OS is complex to design.
PLD
• Microkernel are smaller in size.
• Easier to add new functionalities.
• Failure of one component does not effect
the working of micro kernel.
• Example : Mac OS X.
49
MIT School of Computing
Department of Computer Science & Engineering
51
MIT School of Computing
Department of Computer Science & Engineering
Computer-System Architecture
PLD
52
MIT School of Computing
Department of Computer Science & Engineering
Computer-System Architecture
• A computer system is basically a machine that
simplifies complicated tasks.
• It should maximize performance and reduce costs as
well as power consumption.
PLD
• The different components in the Computer System
Architecture are
1. Input Unit,
2. Output Unit,
3. Storage Unit,
4. Arithmetic Logic Unit,
5. Control Unit etc. 53
MIT School of Computing
Department of Computer Science & Engineering
Input Unit,
• The input unit provides data to the computer
system from the outside.
• So, basically it links the external environment
with the computer. PLD
• It takes data from the input devices, converts
it into machine language and then loads it into
the computer system.
• Keyboard, mouse etc. are the most commonly
used input devices.
54
MIT School of Computing
Department of Computer Science & Engineering
Output Unit
• The output unit provides the results of
computer process to the users i.e it links
the computer with the external
PLD
environment.
• Most of the output data is the form of
audio or video.
• The different output devices are monitors,
printers, speakers, headphones etc.
55
MIT School of Computing
Department of Computer Science & Engineering
Storage Unit
• It is traditionally divided into primary storage and
secondary storage.
• Primary storage is also known as the main memory
and is the memory directly accessible by the CPU.
• Secondary or external PLD storage is not directly
Operating-System Operations
PLD
59
MIT School of Computing
Department of Computer Science & Engineering
Operating-System Operations
1. Process Management
2. Memory Management
3. Storage Management
PLD
60
MIT School of Computing
Department of Computer Science & Engineering
Process Management
• A program in execution is called a process.
• The OS helps you to create, schedule, and
terminates the processes which is used by
PLD
CPU.
• Process management contains various tasks
like creation, scheduling, termination of
processes, and a deadlock handling.
61
MIT School of Computing
Department of Computer Science & Engineering
62
MIT School of Computing
Department of Computer Science & Engineering
Memory Management
64
MIT School of Computing
Department of Computer Science & Engineering
Storage management
• Its provide mechanism to handle and
manage primary memory and secondary
memory while execution of process.
PLD
• Storage management keeps track of each and
every memory location, regardless of either it
is allocated to some process or it is free.
65
MIT School of Computing
Department of Computer Science & Engineering
66
MIT School of Computing
Department of Computer Science & Engineering
5. Communication
6. Resource Allocation
7. Error Detection
8. Accounting
9. Security and protection
67
MIT School of Computing
Department of Computer Science & Engineering
1. User Interface
1. Command line interface
2. Graphical User Interface
PLD
2. Program Execution
• OS manages how a program is going to be executed.
• Loads a program into memory.
PLD
• Executes the program.
• Handles program's execution.
• Provides a mechanism for process synchronization.
• Provides a mechanism for process communication.
• Provides a mechanism for deadlock handling. 69
MIT School of Computing
Department of Computer Science & Engineering
PLD
71
MIT School of Computing
Department of Computer Science & Engineering
5. Communication
• The process communicate with each other in form of data
transfer among them.
• Some time this processes are for same system or some may be
for different processes.
• But through computer network communication is managed by
PLD
OS.
• The communication can be done through
1. Pipe
2. Shared Memory
72
MIT School of Computing
Department of Computer Science & Engineering
Resource Allocation
• Resource allocation means assigning computing
resources to processes and users.
• We have many resource types, such as CPU
(actually, CPU time),PLD
memory, networking, and
I/O devices.
• So, as the operating system controls these
resources, it naturally decides which processes
use them.
• During their lifecycle, a process will typically
require multiple computing resources.
73
MIT School of Computing
Department of Computer Science & Engineering
Error Detection
• It is service of OS must avoid a computer system
completely breaking down when an error happens.
• So, this service must catch errors and manage them,
keeping the entire system as functional as possible.
• It able to inform the user
PLD about the errors, showing
their codes, descriptions, and, if known, manners to fix
them.
• Ex-1.
• CPU errors,
• memory bad allocations or accesses,
• a component failure causing a
hardware error,
• or even an error caused by an I/O
device.
74
MIT School of Computing
Department of Computer Science & Engineering
8. Accounting
• Accounting consists of keeping track of the behavior of
both users and processes in the computing system.
• It obtained information and generate statistics about
the users of the computer system and the processes
PLD
running on it.
75
MIT School of Computing
Department of Computer Science & Engineering
PLD
Biometric Identification
Authentication
Authorization 76
MIT School of Computing
Department of Computer Science & Engineering
Kernel Mode:
• While the CPU is in kernel
mode, programs can directly
access the memory as well as
hardware.
• Ex- Text editor
• Ex- Bank 77
MIT School of Computing
Department of Computer Science & Engineering
SYSTEM CALL:
• A system call is a Programmatical way computer
program request the service from kernel of OS.
• When a program in user mode requires access to
RAM or a hardware PLD resource, it must ask the
kernel to provide access to that resource. This is
done via something called a system call.
• When a program makes a system call, the mode
is switched from user mode to kernel mode.
This is called a context switch.
78
MIT School of Computing
Department of Computer Science & Engineering
SYSTEM CALL:
PLD
79
MIT School of Computing
Department of Computer Science & Engineering
PLD
[Link] Management-
[Link] Management
[Link] Maintenance
[Link]
[Link] Control
80
MIT School of Computing
Department of Computer Science & Engineering
• CreateFile() Open()
ReadFile() Read()
File Manipulation
WriteFile() PLD Write()
CloseHandle() Close()
• SetConsoleMode() Ioctl()
Device Management ReadConsole() Read()
WriteConsole() Write()
• GetCurrentProcessID() Getpid()
Information Maintenance SetTimer() Alarm()
Sleep() Sleep()
• CreatePipe() Pipe()
Communication CreateFileMapping() Shmget()
MapViewOfFile() Mmap()
• SetFileSecurity() Chmod()
Protection InitializeSecurityDescriptor() Umask()
82
SetSecurityDescriptorgroup() Chown()
MIT School of Computing
Department of Computer Science & Engineering
System Programming
• Activity of programming system
software.
• HWOSSystem_callsSP AP
• Program Development & Execution is
PLD done.
• SP provide interface bet UI & System
calls
• SP manage & control H/W &
Resources.
• Ex-
1. Operating system
2. CLI
3. Device driver
4. Compiler& Interpreter
5. Assembler
6. Loader 83
MIT School of Computing
Department of Computer Science & Engineering
System Programming
• System programming is the activity of programming
system software.
• User cannot access computer resources directly.
• System programs provide PLD
services to other software.
• To design for handling resources.
• Some examples of system software Operating systems,
device drivers, compilers, debuggers, web servers,
communication protocols and networking utilities.
• Platform for developing system software are- C, Go,
Rust, Swift and WebAssembly, Perl, and Ruby.
84
MIT School of Computing
Department of Computer Science & Engineering
87
MIT School of Computing
Department of Computer Science & Engineering
89
MIT School of Computing
Department of Computer Science & Engineering
VIRTUAL MACHINE
• Computer having hardware resources as
RAM,CPU, storage and its operated by
operating system i.e. windows.
• If we needs to learnPLD and use Linux it required
separate new computer system with hardware
resources and then on that Linux OS is required.
• In virtualization no need of separate system and
its hardware resources.
• It allow user to install Linux on the top of
Windows.
91
MIT School of Computing
Department of Computer Science & Engineering
VIRTUAL MACHINE
PLD
Computer System without Virtual Machine Computer System with Virtual Machine
92
MIT School of Computing
Department of Computer Science & Engineering
PLD
94
MIT School of Computing
Department of Computer Science & Engineering
PLD
95
MIT School of Computing
Department of Computer Science & Engineering
TYPE OF HYPERVISOR
PLD
96
MIT School of Computing
Department of Computer Science & Engineering
TYPE OF HYPERVISOR
• Type 1 hypervisor functions as a light operating
system that operates directly on the host's
hardware. PLD
• Type 2 hypervisor functions as a software layer
on top of an operating system, similar to other
computer programs.
97
MIT School of Computing
Department of Computer Science & Engineering
98
MIT School of Computing
Department of Computer Science & Engineering
99
MIT School of Computing
Department of Computer Science & Engineering
QUESTION BANK
1. Explain Computer-System Organization with suitable diagram.
2. Enlist and explain different types of system software
3. Enlist and explain different types of Application software
4. Define OS and Explain Functions of Operating Systems.
5. What is virtual Machine and Explain it.
6. What is System Call? What are its different [Link]
7. Elaborate Operating System layered Architecture.
8. List and Explain different operation performed by operating system.
9. Differentiate between system software and Application Software
10. Draw neat diagram and explain in detail computer system Architecture
11. Explain operating system structures?
[Link] is Operating System? Describe operating system architecture with suitable example
13. Explain operating system Design issues.
14. Write difference between Monolithic kernel and Micro kernel.
15. Brief User and Operating System Interface in detail.
100