SlideShare a Scribd company logo
1 of 27
Click to add Text
Operating Systems
Lecture 1
July 12, 2023
© Copyright Virtual University of
Pakistan
Agenda for Today
 Introduction and purpose of the course
 Organization of a computer system
 Purpose of a computer system—setting
the stage for OS concepts and principles
 Outline of topics to be discussed in the
course
 What is an operating system?
 Recap of the lecture
July 12, 2023
© Copyright Virtual University of
Pakistan
Computer System
1. Hardware
2. Operating system
3. Applications programs
4. Users
July 12, 2023
© Copyright Virtual University of
Pakistan
Layered View of a
Computer System
July 12, 2023
© Copyright Virtual University of
Pakistan
Purpose of a Computer
System
 Computer systems consist of
software and hardware that
are combined to provide a
tool to solve specific
problems in an efficient
manner
 Execute programs
July 12, 2023
© Copyright Virtual University of
Pakistan
Computer System Hardware
Keyboard Mouse
Printer
RAM/ROM
HD
Mem
Bus
System Bus
Monitor
CD
Processor
Floating Point
Unit
Integer
Unit
Cache
Control
Unit
July 12, 2023
© Copyright Virtual University of
Pakistan
Course Outline
 Operating system concepts
 Operating system structures
 Introduction to UNIX/Linux user interface
 Processes and threads—scheduling,
concurrency, synchronization, etc.
 Deadlocks
 Memory management
 Virtual memory
 File system
 Secondary storage management
July 12, 2023
© Copyright Virtual University of
Pakistan
Operating System
Concepts
 Single-user systems
 Batch systems
 Multiprogrammed systems
 Time-sharing systems
 Real-time systems
 Interrupts, traps, and software interrupts
(UNIX signals)
 Hardware protection
July 12, 2023
© Copyright Virtual University of
Pakistan
Operating System
Structures
 Operating system services
 System calls
 Semantics of system call execution
 Operating system structures (monolithic,
microkernel-based, layered, virtual
machines, DOS-Windows, UNIX)
 System design and implementation
July 12, 2023
© Copyright Virtual University of
Pakistan
Introduction to UNIX/Linux
 Directory structure
 Browsing directory structure
 Useful commands
July 12, 2023
© Copyright Virtual University of
Pakistan
Processes
 Process concept (process, states,
attributes, etc.)
 Process scheduling (scheduler)
 Context switching (dispatcher)
 Operations on processes (creation,
termination, signaling, suspend,
foreground, background, etc.)
 Process management in UNIX (fork, wait,
exec, exit, etc.)
July 12, 2023
© Copyright Virtual University of
Pakistan
Processes (continued)
 Sample code for UNIX/Linux process
management
 Cooperating processes
 Interprocess communication (IPC)
 IPC in UNIX/Linux (pipe, FIFO, socket,
message queue, etc.)
July 12, 2023
© Copyright Virtual University of
Pakistan
Processes (continued)
 Communication between UNIX/Linux
processes (pipe, mkfifo, read, write, close,
etc.)
 Sample code
 UNIX/Linux processes (process images,
control structures, etc. explained with
sample code)
 Managing UNIX/Linux processes (ps, top,
fg, bg, <Ctrl-Z>, <Ctrl-C>, etc.)
July 12, 2023
© Copyright Virtual University of
Pakistan
Threads
 Thread concept (thread, states,
attributes, etc.)
 User- and kernel-level threads
 POSIX threads (the pthread
library)
 Sample code
July 12, 2023
© Copyright Virtual University of
Pakistan
CPU Scheduling
 Basic concepts
 Scheduling criteria
 Scheduling triggers
 Scheduling algorithms
 UNIX System V scheduling algorithm
 Optimal scheduling
 Algorithm evaluation
July 12, 2023
© Copyright Virtual University of
Pakistan
Process Synchronization
 Basic concept
 The Critical Section Problem
 Solutions for the Critical Section Problem
 Software-based solutions—the Bakery
Algorithm
 Hardware-based solutions
 Semaphores
 Binary and counting semaphores
July 12, 2023
© Copyright Virtual University of
Pakistan
Process Synchronization …
 Classic problems of synchronization
 Deadlocks and starvation
 Critical regions
 Monitors
 Synchronization tools used in Solaris,
Linux, and Windows
 Deadlocks and starvation
 Pthread library functions
July 12, 2023
© Copyright Virtual University of
Pakistan
Deadlocks
 Basic concept
 Deadlock characterization
 Deadlock handling (prevention, avoidance,
detection and recovery)
 Banker’s algorithm
July 12, 2023
© Copyright Virtual University of
Pakistan
Memory Management
 Basic concepts
 Various techniques for memory
management
 Logical to physical address translation
 Swapping
 Contiguous memory allocation: MFT, MVT
 External fragmentation
 Paging
 Hardware support for paging
 Internal fragmentation
July 12, 2023
© Copyright Virtual University of
Pakistan
Memory Management …
 Performance of paging
 Protection and sharing
 Page table issues: Multi-level paging,
Hashed page tables, Inverted page tables
 Segmentation
 Protection and sharing
 Segmentation with paging
 Intel P4 example
July 12, 2023
© Copyright Virtual University of
Pakistan
Virtual Memory
 Basic concept
 Demand paging
 Page fault
 Performance of demand paging
 Page replacement
 Allocation of frames
 Thrashing
 Operating-system examples
 Other considerations (I/O locking, page
size, …)
July 12, 2023
© Copyright Virtual University of
Pakistan
File System Interface
 Basic concepts (file attributes, operations,
types, structure, etc.)
 Access methods (sequential, random, etc.)
 Directory structure
 UNIX/Linux directory structure (links in UNIX)
 File system mounting, sharing, and
protection
 UNIX/Linux examples for sharing and
protection, and relevant commands (chmod,
ln, ln –s, etc.)
July 12, 2023
© Copyright Virtual University of
Pakistan
File System Implementation
 Basic concepts (overview of disk structure,
file structure, boot control block, super
block, inode, per process file descriptor
table, system-wide open-file table, etc.)
 Directory implementation
 Free space management methods
 Space Allocation Methods
 Time and space performance of allocation
methods
 Brief introduction to Network File System
(NFS)
July 12, 2023
© Copyright Virtual University of
Pakistan
Mass Storage Structure
and Scheduling
 Disk structure and scheduling
 Disk management (formatting,
boot block, bad blocks, etc.)
 Course Recap
July 12, 2023
© Copyright Virtual University of
Pakistan
What is an Operating
System?
 A program that acts as an intermediary
between a user of a computer and the
computer hardware—provides the user a
simpler (virtual) machine to work with
 A program that allocates and deallocates
computer system resources in an efficient,
fair, and secure manner—a resource
manager
July 12, 2023
© Copyright Virtual University of
Pakistan
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.
Click to add Text
Operating Systems
Lecture 1

More Related Content

Similar to Lec1.CS604.ppt

Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systemsPradeep Kumar TS
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systemsPradeep Kumar TS
 
Visual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & VirtualisationVisual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & Virtualisationwangyuanyi
 
OPERATING SYSTEMS NOTES R18 .pdf
OPERATING SYSTEMS  NOTES R18         .pdfOPERATING SYSTEMS  NOTES R18         .pdf
OPERATING SYSTEMS NOTES R18 .pdfcVan3
 
Understanding operating systems 5th ed ch10
Understanding operating systems 5th ed ch10Understanding operating systems 5th ed ch10
Understanding operating systems 5th ed ch10BarrBoy
 
lecture_1_introduction.ppt
lecture_1_introduction.pptlecture_1_introduction.ppt
lecture_1_introduction.pptRandyGaray
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probertyang
 
Resist Dictionary Attacks Using Password Based Protocols For Authenticated Ke...
Resist Dictionary Attacks Using Password Based Protocols For Authenticated Ke...Resist Dictionary Attacks Using Password Based Protocols For Authenticated Ke...
Resist Dictionary Attacks Using Password Based Protocols For Authenticated Ke...IJERA Editor
 
A cloud environment for backup and data storage
A cloud environment for backup and data storageA cloud environment for backup and data storage
A cloud environment for backup and data storageIGEEKS TECHNOLOGIES
 
International Journal of Computer Science and Security Volume (4) Issue (1)
International Journal of Computer Science and Security Volume (4) Issue (1)International Journal of Computer Science and Security Volume (4) Issue (1)
International Journal of Computer Science and Security Volume (4) Issue (1)CSCJournals
 
Operating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxOperating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxPrudhvi668506
 
A cloud enviroment for backup and data storage
A cloud enviroment for backup and data storageA cloud enviroment for backup and data storage
A cloud enviroment for backup and data storageIGEEKS TECHNOLOGIES
 
2 - SystemComponents.ppt
2 - SystemComponents.ppt2 - SystemComponents.ppt
2 - SystemComponents.pptTekalignTaye
 
Operating system basics, Types of operating systems, Tasks, Process and Thre...
Operating system basics, Types of operating  systems, Tasks, Process and Thre...Operating system basics, Types of operating  systems, Tasks, Process and Thre...
Operating system basics, Types of operating systems, Tasks, Process and Thre...SattiBabu16
 

Similar to Lec1.CS604.ppt (20)

Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
Visual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & VirtualisationVisual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & Virtualisation
 
OS-UNIT-1-Part-1.pptx
OS-UNIT-1-Part-1.pptxOS-UNIT-1-Part-1.pptx
OS-UNIT-1-Part-1.pptx
 
OPERATING SYSTEMS NOTES R18 .pdf
OPERATING SYSTEMS  NOTES R18         .pdfOPERATING SYSTEMS  NOTES R18         .pdf
OPERATING SYSTEMS NOTES R18 .pdf
 
Understanding operating systems 5th ed ch10
Understanding operating systems 5th ed ch10Understanding operating systems 5th ed ch10
Understanding operating systems 5th ed ch10
 
lecture_1_introduction.ppt
lecture_1_introduction.pptlecture_1_introduction.ppt
lecture_1_introduction.ppt
 
Chapter 22 - Windows XP
Chapter 22 - Windows XPChapter 22 - Windows XP
Chapter 22 - Windows XP
 
Evolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave ProbertEvolution of the Windows Kernel Architecture, by Dave Probert
Evolution of the Windows Kernel Architecture, by Dave Probert
 
Oct2009
Oct2009Oct2009
Oct2009
 
Resist Dictionary Attacks Using Password Based Protocols For Authenticated Ke...
Resist Dictionary Attacks Using Password Based Protocols For Authenticated Ke...Resist Dictionary Attacks Using Password Based Protocols For Authenticated Ke...
Resist Dictionary Attacks Using Password Based Protocols For Authenticated Ke...
 
A cloud environment for backup and data storage
A cloud environment for backup and data storageA cloud environment for backup and data storage
A cloud environment for backup and data storage
 
International Journal of Computer Science and Security Volume (4) Issue (1)
International Journal of Computer Science and Security Volume (4) Issue (1)International Journal of Computer Science and Security Volume (4) Issue (1)
International Journal of Computer Science and Security Volume (4) Issue (1)
 
Operating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptxOperating Systems R20 Unit 2.pptx
Operating Systems R20 Unit 2.pptx
 
Gt3112931298
Gt3112931298Gt3112931298
Gt3112931298
 
A cloud enviroment for backup and data storage
A cloud enviroment for backup and data storageA cloud enviroment for backup and data storage
A cloud enviroment for backup and data storage
 
2 - SystemComponents.ppt
2 - SystemComponents.ppt2 - SystemComponents.ppt
2 - SystemComponents.ppt
 
Operating System - File system
Operating System - File systemOperating System - File system
Operating System - File system
 
UNIX Operating System ppt
UNIX Operating System pptUNIX Operating System ppt
UNIX Operating System ppt
 
Operating system basics, Types of operating systems, Tasks, Process and Thre...
Operating system basics, Types of operating  systems, Tasks, Process and Thre...Operating system basics, Types of operating  systems, Tasks, Process and Thre...
Operating system basics, Types of operating systems, Tasks, Process and Thre...
 

Recently uploaded

WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Eraconfluent
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2
 

Recently uploaded (20)

WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
WSO2Con2024 - Simplified Integration: Unveiling the Latest Features in WSO2 L...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
WSO2CON 2024 - Unlocking the Identity: Embracing CIAM 2.0 for a Competitive A...
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 

Lec1.CS604.ppt

  • 1. Click to add Text Operating Systems Lecture 1
  • 2. July 12, 2023 © Copyright Virtual University of Pakistan Agenda for Today  Introduction and purpose of the course  Organization of a computer system  Purpose of a computer system—setting the stage for OS concepts and principles  Outline of topics to be discussed in the course  What is an operating system?  Recap of the lecture
  • 3. July 12, 2023 © Copyright Virtual University of Pakistan Computer System 1. Hardware 2. Operating system 3. Applications programs 4. Users
  • 4. July 12, 2023 © Copyright Virtual University of Pakistan Layered View of a Computer System
  • 5. July 12, 2023 © Copyright Virtual University of Pakistan Purpose of a Computer System  Computer systems consist of software and hardware that are combined to provide a tool to solve specific problems in an efficient manner  Execute programs
  • 6. July 12, 2023 © Copyright Virtual University of Pakistan Computer System Hardware Keyboard Mouse Printer RAM/ROM HD Mem Bus System Bus Monitor CD Processor Floating Point Unit Integer Unit Cache Control Unit
  • 7. July 12, 2023 © Copyright Virtual University of Pakistan Course Outline  Operating system concepts  Operating system structures  Introduction to UNIX/Linux user interface  Processes and threads—scheduling, concurrency, synchronization, etc.  Deadlocks  Memory management  Virtual memory  File system  Secondary storage management
  • 8. July 12, 2023 © Copyright Virtual University of Pakistan Operating System Concepts  Single-user systems  Batch systems  Multiprogrammed systems  Time-sharing systems  Real-time systems  Interrupts, traps, and software interrupts (UNIX signals)  Hardware protection
  • 9. July 12, 2023 © Copyright Virtual University of Pakistan Operating System Structures  Operating system services  System calls  Semantics of system call execution  Operating system structures (monolithic, microkernel-based, layered, virtual machines, DOS-Windows, UNIX)  System design and implementation
  • 10. July 12, 2023 © Copyright Virtual University of Pakistan Introduction to UNIX/Linux  Directory structure  Browsing directory structure  Useful commands
  • 11. July 12, 2023 © Copyright Virtual University of Pakistan Processes  Process concept (process, states, attributes, etc.)  Process scheduling (scheduler)  Context switching (dispatcher)  Operations on processes (creation, termination, signaling, suspend, foreground, background, etc.)  Process management in UNIX (fork, wait, exec, exit, etc.)
  • 12. July 12, 2023 © Copyright Virtual University of Pakistan Processes (continued)  Sample code for UNIX/Linux process management  Cooperating processes  Interprocess communication (IPC)  IPC in UNIX/Linux (pipe, FIFO, socket, message queue, etc.)
  • 13. July 12, 2023 © Copyright Virtual University of Pakistan Processes (continued)  Communication between UNIX/Linux processes (pipe, mkfifo, read, write, close, etc.)  Sample code  UNIX/Linux processes (process images, control structures, etc. explained with sample code)  Managing UNIX/Linux processes (ps, top, fg, bg, <Ctrl-Z>, <Ctrl-C>, etc.)
  • 14. July 12, 2023 © Copyright Virtual University of Pakistan Threads  Thread concept (thread, states, attributes, etc.)  User- and kernel-level threads  POSIX threads (the pthread library)  Sample code
  • 15. July 12, 2023 © Copyright Virtual University of Pakistan CPU Scheduling  Basic concepts  Scheduling criteria  Scheduling triggers  Scheduling algorithms  UNIX System V scheduling algorithm  Optimal scheduling  Algorithm evaluation
  • 16. July 12, 2023 © Copyright Virtual University of Pakistan Process Synchronization  Basic concept  The Critical Section Problem  Solutions for the Critical Section Problem  Software-based solutions—the Bakery Algorithm  Hardware-based solutions  Semaphores  Binary and counting semaphores
  • 17. July 12, 2023 © Copyright Virtual University of Pakistan Process Synchronization …  Classic problems of synchronization  Deadlocks and starvation  Critical regions  Monitors  Synchronization tools used in Solaris, Linux, and Windows  Deadlocks and starvation  Pthread library functions
  • 18. July 12, 2023 © Copyright Virtual University of Pakistan Deadlocks  Basic concept  Deadlock characterization  Deadlock handling (prevention, avoidance, detection and recovery)  Banker’s algorithm
  • 19. July 12, 2023 © Copyright Virtual University of Pakistan Memory Management  Basic concepts  Various techniques for memory management  Logical to physical address translation  Swapping  Contiguous memory allocation: MFT, MVT  External fragmentation  Paging  Hardware support for paging  Internal fragmentation
  • 20. July 12, 2023 © Copyright Virtual University of Pakistan Memory Management …  Performance of paging  Protection and sharing  Page table issues: Multi-level paging, Hashed page tables, Inverted page tables  Segmentation  Protection and sharing  Segmentation with paging  Intel P4 example
  • 21. July 12, 2023 © Copyright Virtual University of Pakistan Virtual Memory  Basic concept  Demand paging  Page fault  Performance of demand paging  Page replacement  Allocation of frames  Thrashing  Operating-system examples  Other considerations (I/O locking, page size, …)
  • 22. July 12, 2023 © Copyright Virtual University of Pakistan File System Interface  Basic concepts (file attributes, operations, types, structure, etc.)  Access methods (sequential, random, etc.)  Directory structure  UNIX/Linux directory structure (links in UNIX)  File system mounting, sharing, and protection  UNIX/Linux examples for sharing and protection, and relevant commands (chmod, ln, ln –s, etc.)
  • 23. July 12, 2023 © Copyright Virtual University of Pakistan File System Implementation  Basic concepts (overview of disk structure, file structure, boot control block, super block, inode, per process file descriptor table, system-wide open-file table, etc.)  Directory implementation  Free space management methods  Space Allocation Methods  Time and space performance of allocation methods  Brief introduction to Network File System (NFS)
  • 24. July 12, 2023 © Copyright Virtual University of Pakistan Mass Storage Structure and Scheduling  Disk structure and scheduling  Disk management (formatting, boot block, bad blocks, etc.)  Course Recap
  • 25. July 12, 2023 © Copyright Virtual University of Pakistan What is an Operating System?  A program that acts as an intermediary between a user of a computer and the computer hardware—provides the user a simpler (virtual) machine to work with  A program that allocates and deallocates computer system resources in an efficient, fair, and secure manner—a resource manager
  • 26. July 12, 2023 © Copyright Virtual University of Pakistan 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.
  • 27. Click to add Text Operating Systems Lecture 1