![Page 1: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/1.jpg)
Operating Systems (IIOS-332C)
![Page 2: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/2.jpg)
Introduction to Operating
Systems
• All desktop computers use an operatingsystem.
• Common desktop operating systems include:– Windows
– Unix
– Linux
• There are hundreds of other operatingsystems available for special-purposeapplications e.g. mobile phones, PDAs etc.
![Page 3: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/3.jpg)
What is an Operating System?
• A program that acts as an intermediary between
a user of a computer and the computer hardware.
• 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.
![Page 4: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/4.jpg)
Operating System Definition
• OS is a resource allocator
– Manages all resources
– Decides between conflicting requests for
efficient and fair resource use
• OS is a control program
– Controls execution of programs to prevent
errors and improper use of the computer
![Page 5: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/5.jpg)
Resources of Computer System
Computer System
Processor
Memory and
Disks
Files
Input Output Devices
5
![Page 6: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/6.jpg)
Computer System Structure
Computer System
Software
System Software
Application Software
Hardware
Language
Translators
Operating
system
![Page 7: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/7.jpg)
Four Components of a Computer
System
![Page 8: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/8.jpg)
8
Components of an Operating
System
Operating system – part of the computing system
that manages all of the hardware and all of the
software
– Controls every file, device, section of main memory &
every nanosecond of processing time
• Memory manager
• Processor manager
• Device manager
• File manager
Operating system
consists of
![Page 9: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/9.jpg)
9
Coordination of Operating System
![Page 10: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/10.jpg)
10
Types of Operating Systems
• GUI
• Examples
– Windows: Everything is presented to user graphically
– Mac OSX
– Linux running xWindows
• CUI
• Examples
– MS-DOS
– Unix
![Page 11: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/11.jpg)
Types of Operating Systems
• Single user OS
– MS-DOS
– Windows 1.0
– Windows 2.x , Windows 3.x , Windows 95
Windows 98, Windows ME
• Multi user OS
– Unix, Windows NT, 2000, XP
11
![Page 12: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/12.jpg)
Types of Operating Systems
• Single User
– Serial Processing OS
• Working in serial manner: Card Reader
– Batch Processing OS
• Batch of jobs can be executed together.
12
![Page 13: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/13.jpg)
13
Types of Operating Systems
• Serial Processing
– No operating system
– Machines run from a console with display lights, toggle
switches, input device, and printer
– Schedule time
– Setup included loading the compiler, source program,
saving compiled program, and loading and linking
![Page 14: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/14.jpg)
14
Types of Operating Systems
• Simple Batch Systems• Software that controls the sequence of events
• Batch jobs together
• Example: The concept of batch files in DOS and Unix.
![Page 15: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/15.jpg)
Types of Operating Systems
• Types of Multi User OS
– Multiprogramming OS
– Time Sharing OS
– Multiprocessing OS
15
![Page 16: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/16.jpg)
Why Multiprogramming
• To have maximum utilization of
the CPU
16
![Page 17: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/17.jpg)
17
The CPU is wasted if a job waits for I/O. This leads to:
– Multiprogramming (dynamic switching ). Whileone job waits for a resource, the CPU can findanother job to run. It means that several jobsare ready to run and only need the CPU in orderto continue.
All of this leads to:
– memory management
– resource scheduling
– deadlock protection
Why Multiprogramming
![Page 18: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/18.jpg)
Why Time Sharing
• Time Sharing - multiprogramming
environment that's also interactive.
• Fair Scheduling is also important……
18
![Page 19: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/19.jpg)
Working of Processor
• In Uniprogramming Way….
• In Multiprogramming Way…..
19
![Page 20: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/20.jpg)
20
Uniprogramming
• Processor must wait for I/O instruction to
complete before preceding
![Page 21: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/21.jpg)
21
Multiprogramming
• When one job needs to wait for I/O, the
processor can switch to the other job
![Page 22: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/22.jpg)
22
Multiprogramming
![Page 23: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/23.jpg)
23
Time Sharing
• Using multiprogramming to handle multiple
interactive jobs
• Processor’s time is shared among multiple users
• Multiple users simultaneously access the system
through terminals
![Page 24: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/24.jpg)
24
• Multiprocessing- Specific applications….
• Multiple Processor may be there…..
• System can communicate via shared memory…..
• Speed improvement by putting together anumber of processors.
.
Why Multiprocessing
![Page 25: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/25.jpg)
Types of Operating Systems
• Multi User OS
– Distributed Operating System
– Network Operating System
25
![Page 26: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/26.jpg)
Distributed Operating System
A distributed system is a collection of
autonomous computers that appear to
the users of the system as a single
computer.
![Page 27: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/27.jpg)
27
• Distributed Systems - communicate viamessage passing.
• Advantages include resource sharing, speedup, reliability, communication.
• There is a single system image
Why Distributed OS
![Page 28: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/28.jpg)
• By contrast, one could imagine an operating
system in which users are never concerned with
where their programs run, or the location of any
resources.
• The operating system has control over all the
nodes in the system, and it transparently locates
new processes at whatever node suits its
scheduling policies.
Distributed Operating System
![Page 29: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/29.jpg)
Why Distributed Systems?
• Resource sharing
• Scalability
• Reliability
• Need for higher processing speed
• Spatial distribution is inherent in many applications
![Page 30: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/30.jpg)
Network Operating System
• It provides an environment where users are
aware of the multiplicity of machines.
• Users can access remote resources by
– logging into the remote machine OR
– transferring data from the remote machine to
their own machine
• Users should know where the required files
and directories are….
• Each machine could act like a server and a
client at the same time.
![Page 31: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/31.jpg)
Types of Operating Systems
• Special Operating System
– Real Time Operating System
• Hard Real Time
• Soft Real Time
31
![Page 32: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/32.jpg)
32
What are Real-time Systems ?
Those systems in which the correctness of the
system depends not only on the logical result of
computation, but also on the time at which the
results are produced.
![Page 33: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/33.jpg)
33
Types of Real Time Systems
• Based on Hard deadline: Penalty due to missing
deadline is a higher order of magnitude than the
Reward in meeting the deadline.
• Based on Soft deadline: Penalty often equal /
lesser magnitude than Reward.
![Page 34: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/34.jpg)
Soft RTOS…
• In a soft real-time system, it is considered undesirable, but not catastrophic, if deadlines are occasionally missed.
• Also known as “best effort” systems
• Most modern operating systems can serve as the base for a soft real time systems.
• Examples:
– multimedia transmission and reception,
– networking, telecom (cellular) networks,
– web sites and services
– computer games.
![Page 35: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/35.jpg)
Hard RTOS…
• A hard real-time system has time-critical deadlines that must be met; otherwise a catastrophic system failure can occur.
• Absolutely, positively, first time every time
• Requires formal verification/guarantees of being to always meet its hard deadlines (except for fatal errors).
• Examples:
– air traffic control
– vehicle subsystems control
– Nuclear power plant control
![Page 36: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/36.jpg)
Types of Operating Systems
• Special Operating System
– Embedded Operating System
– Parallel Operating System
36
![Page 37: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/37.jpg)
What is an Embedded OS?
• An "embedded system" is any computer system or
computing device that performs a dedicated function
or is designed for use with a specific embedded
software application.
• Embedded systems may use a ROM-based
operating system or they may use a disk-based
system, like a PC. But an embedded system is not
usable as a commercially viable substitute for
general purpose computers or devices.
![Page 38: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/38.jpg)
Example of Parallel Processing
Environment
MPP Massively Parallel ProcessorSMP Symmetric Multi-Processor
cpu cpu cpu
Fast Interconnect
Memory (shared)
cpu
Mem
cpu
Mem
cpu
Mem
Interconnect (varies)
![Page 39: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/39.jpg)
P PP P P P..
Microkernel
Multi-Processor Computing System
Threads Interface
Hardware
Operating System
ProcessProcessor ThreadP
Applications
Parallel Computing
Environment
Programming paradigms
![Page 40: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/40.jpg)
40
Brief History of Operating
Systems Development
1940 1955 1965 1980
1990
First Generation
Vacuum tube, single
user, early operating
systems
Second Generation
Job scheduling, JCL,
faster I/O, spooling,
batch, files
Third Generation
Shared processing,
multiprogramming, virtual
memory, DBMS
Recent Developments
Distributed computing,
personal computers, high-
speed communication, multi-
media
![Page 41: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/41.jpg)
Syllabus
• Operating System Structures
– General OS task: resource mgmt, Sharing & Protection
– OS Interfaces: shells, API, system calls
– Architecture of OS
– Layered system design
– Microkernels
– Modularized approach
– Virtual Machines
– System Boot process
41
![Page 42: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/42.jpg)
Syllabus
• Process Concept
• Overview
• Scheduling
• Operations
• Interprocess Communication
• Process Vs. Thread
• Multithreaded Programming
42
![Page 43: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/43.jpg)
Syllabus
• Process Scheduling
– Scheduling Criteria
– Scheduling Algorithm
– Multi-Processor Scheduling
– Algorithm Evaluation
43
![Page 44: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/44.jpg)
Syllabus
• Process Synchronization
– Mutual exclusion
– Critical sections
– Classical synchronization problems
– Bounded Buffers
– Readers/writers
– Dining Philosophers
– Atomic transactions (cf. databases)
– Logging, UNDO/REDO recovery
– Concurrency Control, Serializability, Locking Time-
Stamping 44
![Page 45: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/45.jpg)
Syllabus
Deadlocks
• Define the problem, give necessary conditions!– Graph-based models (single vs. multiple resources per type)
– Resource Allocation Graph
– Wait-For Graph
• Deadlock Prevention and Detection
• How/when can we detect that the system/some
processes is/are in a deadlock state?
• Recovery from deadlock
• If we detected a deadlock: how to resolve the
situation? 45
![Page 46: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/46.jpg)
Syllabus
• Memory Management
– Background
– Swapping
– Memory Allocation Techniques
– Paging
– Segmentation
46
![Page 47: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/47.jpg)
Syllabus
• Virtual- Memory Management
– Background
– Demand Paging
– Copy-on-Write
– Page Replacement
– Allocation of Frames
– Thrashing
47
![Page 48: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/48.jpg)
Syllabus
• File Management
– File Concept
– Access Methods
– Directory Structure
– File System Mounting
– File Sharing
– Protection
48
![Page 49: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/49.jpg)
Syllabus
• Implementing File System
– File System Structure
– File System Implementation
– Directory Implementation
– Allocation Methods
– Free Space Management
49
![Page 50: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/50.jpg)
Syllabus
• Mass Storage Structure
– Physical characteristics & performance
determinants of disk technology
– Connecting disks and processors
– Disk scheduling
– Different algorithms with their pros & cons
– Overcoming disk failures
– Storage hierarchy, tertiary storage
50
![Page 51: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/51.jpg)
Syllabus
• I/O Systems
– Transforming application-level commands into device
operations
– Analyze the steps necessary & point out major OS
tasks
– Ports, polling, interrupts, DMA, device drivers, kernel
I/O
– Show how interrupt handling is done in the OS!
– Why several levels (priorities), masking, etc.?
– Blocking vs. non-blocking vs. asynchronous I/O
– Give an example, show principal steps of interaction
between user process and OS components 51
![Page 52: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/52.jpg)
Syllabus
• Protection
– Goals, principles, mechanisms of protection
– Model used for protection (objects, domains, access-
rights)
– Access matrix
– Addition of rights
– Revocation of rights
– Capabilities vs. access control lists
– Roles
52
![Page 53: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/53.jpg)
Points to note…………
• Major areas
– Processor Management
– Memory Management
– File Management
– Disk Management
– Input/ Output Management
53
![Page 54: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/54.jpg)
Functions of an OS
• Processor management
• Memory management
• Device management
• Storage management
• Application interface
• User interface
![Page 55: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/55.jpg)
Processor Management
• The OS has tomanage theexecution ofprocesses so thatyou believe thatthere are severalthings happeningat once.
![Page 56: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/56.jpg)
Processor Management
56
However, the processor can only do onething at a time.
In order to give the appearance of lots ofthings happening at the same time, the OShas to switch between different processesthousands of times a second making surethat each process and application receivesenough of the processor's time to functionproperly.
![Page 57: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/57.jpg)
Memory Management
• The OS manages memory (RAM). Whenapplications are loaded they need memory to workwith. The OS allocates software RAM to work in. Itensures that the RAM allocated is not used byanother application.
• The OS also manages virtual memory. In thisway the computer can run more applications thanit has RAM for. For example if a computer wasrunning a word processor and the user wanted toload a spreadsheet application at the same timeand there was not enough RAM then the OS usesthe hard disc as virtual RAM.
![Page 58: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/58.jpg)
Device Management (Input/Output)
• The OS makes use of queues and buffers, specialstorage facilities that take a stream of bits (data)from a device, e.g. a keyboard, hold those bits, andthen release them to the CPU at a rate slow enoughfor the CPU to cope with.
• This function is very important when a number ofprocesses are running and taking up processortime. The OS will instruct a buffer to continue takinginput from the device, but to stop sending data tothe CPU while the process using the input issuspended. Then, when the process needing inputis made active once again, the OS will commandthe buffer to send data.
![Page 59: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/59.jpg)
Device Management (Drivers)
• The operating system needs to communicate withthe various hardware components which make upthe computer. Special programs called driversenable the OS to communicate with these hardwaredevices. Drivers are needed as the hardware whichmakes up a PC may be vastly different to that ofanother PC with the same OS installed.
• Drivers are translation programs which convert themessages from the OS into messages that thehardware device can understand.
![Page 60: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/60.jpg)
User Interface
• The user interface (UI) brings structure to the interaction between a user and the computer.
GUI
![Page 61: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/61.jpg)
61
Operating Systems in Practice
MS-DOS Operating System
Windows Operating System
UNIX/Linux Operating System
IBM OS/390 Operating System
Open Source Operating System
![Page 62: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/62.jpg)
62
Operating System Objectives
• Convenience
– Makes the computer more convenient to use
• Efficiency
– Allows computer system resources to be used in an
efficient manner
• Ability to evolve
– Permit effective development, testing, and introduction
of new system functions without interfering with service
![Page 63: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/63.jpg)
63
Services Provided by the
Operating System
• Program development
– Editors and debuggers
• Program execution
• Access to I/O devices
• Controlled access to files
• System access
![Page 64: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/64.jpg)
64
Services Provided by the
Operating System
• Error detection and response
– Internal and external hardware errors
• Memory error
• Device failure
– Software errors
• Arithmetic overflow
• Access forbidden memory locations
– Operating system cannot grant request of application
![Page 65: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/65.jpg)
65
Services Provided by the
Operating System
• System Accounting
– Collect usage statistics
– Monitor performance
– Used to anticipate future enhancements
![Page 66: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/66.jpg)
66
Kernel
• Portion of operating system that is in main
memory
• Contains most frequently used functions
• Also called the nucleus
![Page 67: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/67.jpg)
67
Job Control Language (JCL)
• Special type of programming language
• Provides instruction to the monitor an executing
unit
– What compiler to use
– What data to use
![Page 68: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/68.jpg)
68
Processes
• A program in execution
• An instance of a program running on a computer
• The entity that can be assigned to and executedon a processor
• A unit of activity characterized by a singlesequential thread of execution, a current state,and an associated set of system resources
![Page 69: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/69.jpg)
69
Difficulties with Designing
System Software
• Improper synchronization
– Ensure a process waiting for an I/O device receives the
signal
• Failed mutual exclusion
• Nondeterminate program operation
– Program should only depend on input to it, not on the
activities of other programs
• Deadlocks
![Page 70: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/70.jpg)
70
Process
• Consists of three components
– An executable program
– Associated data needed by the program
– Execution context of the program
• All information the operating system needs to manage the
process
![Page 71: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/71.jpg)
71
Memory Management
• Process isolation
• Automatic allocation and management
• Support of modular programming
• Protection and access control
• Long-term storage
![Page 72: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/72.jpg)
72
Virtual Memory
• Allows programmers to address memory from a
logical point of view
• No gap between the execution of successive
processes while one process was written out to
secondary store and the successor process was
read in
![Page 73: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/73.jpg)
73
Virtual Memory and File
System
• Implements long-term store
• Information stored in named objects called files
![Page 74: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/74.jpg)
74
Information Protection and
Security
• Availability
– Concerned with protecting the system against
interruption
• Confidentiality
– Assuring that users cannot read data for which access
is unauthorized
![Page 75: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/75.jpg)
75
Information Protection and
Security
• Data integrity
– Protection of data from unauthorized modification
• Authenticity
– Concerned with the proper verification of the identity of
users and the validity of messages or data
![Page 76: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/76.jpg)
76
Scheduling and Resource
Management
• Fairness
– Give equal and fair access to resources
• Differential responsiveness
– Discriminate among different classes of jobs
• Efficiency
– Maximize throughput, minimize response
time, and accommodate as many uses as
possible
![Page 77: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/77.jpg)
77
System Structure
• View the system as a series of levels
• Each level performs a related subset of functions
• Each level relies on the next lower level to perform
more primitive functions
• This decomposes a problem into a number of
more manageable subproblems
![Page 78: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/78.jpg)
78
Modern Operating Systems
• Multithreading
– Process is divided into threads that can run
concurrently
• Thread
– Dispatchable unit of work
– executes sequentially and is interruptable
• Process is a collection of one or more threads
![Page 79: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/79.jpg)
79
Modern Operating Systems
• Symmetric multiprocessing (SMP)
– There are multiple processors
– These processors share same main memory and I/O
facilities
– All processors can perform the same functions
![Page 80: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/80.jpg)
Characteristics of Modern
Operating Systems
• Microkernel architecture
– assigns only a few essential functions to the kernel
• address space
• interprocess communication (IPC)
• basic scheduling
![Page 81: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/81.jpg)
Characteristics of Modern
Operating Systems
• Multithreading
– process is divided into threads that can run
simultaneously
• Thread
– dispatchable unit of work
– executes sequentially and is interruptable
• Process is a collection of one or more threads
![Page 82: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/82.jpg)
Characteristics of Modern
Operating Systems
• Symmetric multiprocessing
– there are multiple processors
– these processors share same main memory and I/O
facilities
– All processors can perform the same functions
![Page 83: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/83.jpg)
Characteristics of Modern
Operating Systems
• Distributed operating systems
– provides the illusion of a single main memory and
single secondary memory space
– used for distributed file system
![Page 84: Operating Systems (IIOS-332C) - Sonali Agarwalsonaliagarwal.com/osslides/os1.pdf · Types of Operating Systems •Serial Processing ... DBMS Recent Developments Distributed computing,](https://reader033.vdocuments.net/reader033/viewer/2022051800/5ad6ac397f8b9a3e578b6c12/html5/thumbnails/84.jpg)
Characteristics of Modern
Operating Systems
• Object-oriented design
– used for adding modular extensions to a small kernel
– enables programmers to customize an operating
system without disrupting system integrity