SlideShare a Scribd company logo
1 of 26
1.1 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Chapter 1: Introduction
1.2 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Md. Shafiul Alam Forhad
Department of CSE
CUET
Introduction
Presented By
Course Title: Operating Systems
1.3 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Chapter 1: Introduction
■ What Operating Systems Do
■ Computer-System Organization
■ Computer-System Architecture
■ Operating-System Structure
■ Operating-System Operations
■ Protection and Security
■ Distributed Systems
■ Cloud Computing
1.4 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
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
1.5 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Computer System Structure
■ Computer system can be divided into four
components
● Hardware – provides basic computing
resources
4 CPU, memory, I/O devices
● Operating system
4 Controls and coordinates use of
hardware among various applications
and users
● Application programs – define the ways
in which the system resources are used to
solve the computing problems of the users
4 Word processors, compilers, web
browsers, database systems, video
games
● Users
4 People, machines, other computers
1.6 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
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. No universally accepted definition
■ “The one program running at all times on the computer” is the kernel.
Everything else is either a system program (ships with the operating
system) or an application program.
1.7 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Computer System Organization
■ Computer-system operation
● One or more CPUs, device controllers connect through common
bus providing access to shared memory
● Concurrent execution of CPUs and devices competing for memory
cycles
1.8 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Computer-System Operation
■ I/O devices and the CPU can execute concurrently
■ Each device controller is in charge of a particular device type
■ Each device controller has a local buffer
■ CPU moves data from/to main memory to/from local buffers
■ I/O is from the device to local buffer of controller
■ Device controller informs CPU that it has finished its operation by causing an interrupt
Computer Startup
■ Bootstrap program is loaded at power-up or reboot
● Typically stored in ROM or EPROM, generally known as firmware
● Initializes all aspects of system including the CPU registers, device controllers, and
memory contents
● Locates and loads operating system kernel and starts execution of the first process
(such as “init”) and waits for events to occur.
1.9 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
I/O Structure
■ After I/O starts, control returns to user program without waiting for I/O
completion
● System call – request to the operating system to allow user to wait
for I/O completion
● Device-status table contains entry for each I/O device indicating
its type, address, and state
● Operating system indexes into I/O device table to determine device
status and to modify table entry to include interrupt
1.10 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Storage Structure
■ Main memory – only large storage media that the CPU can access directly
■ Programs and data cannot reside in main memory permanently because:
● Main memory is limited (too small) to store all programs and data
permanently
● Main memory is volatile
■ So secondary storage is provided – extension of main memory that provides
large nonvolatile storage capacity
■ Magnetic disks – rigid metal or glass platters covered with magnetic
recording material
● Disk surface is logically divided into tracks, which are subdivided into
sectors
● The disk controller determines the logical interaction between the
device and the computer
Magnetic Disks
Milos Prvulovic
1.12 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Storage Hierarchy
■ Storage systems organized in hierarchy by
● Speed
● Cost
● Volatility
■ The higher levels in the hierarchy are expensive but fast. As we move
down the hierarchy, the cost per bit generally decreases, whereas the
access time generally increases.
■ Caching – copying information into faster storage system; main
memory can be viewed as a last cache for secondary storage
1.13 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Storage-Device Hierarchy
1.14 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Caching
■ Important principle, performed at many levels in a computer (in
hardware, operating system, software)
■ Information in use copied from slower to faster storage temporarily
■ Faster storage (cache) checked first to determine if information is
there
● If it is, information used directly from the cache (fast)
● If not, data copied to cache and used there
■ Cache smaller than storage being cached
● Cache management important design problem
● Cache size and replacement policy
1.15 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
How a Modern Computer Works
1.16 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Computer-System Architecture
■ Most systems use a single general-purpose processor
● Most systems have special-purpose processors as well
■ Multiprocessors systems growing in use and importance
● Also known as parallel systems, tightly-coupled systems
● Advantages include
1. Increased throughput
2. Economy of scale
3. Increased reliability – graceful degradation or fault tolerance
● Two types
1. Asymmetric Multiprocessing
2. Symmetric Multiprocessing
17
Multiprocessing
● The term multiprocessing refers to multiple processors working in
parallel. This is a generic definition, and it can refer to multiple
processors in the same chip, or processors across different chips. A
multicore processor is a specific type of multiprocessor that
contains all of its constituent processors in the same chip. Each
such processor is known as a core.
18
Symmetric vs Asymmetric MPs
Symmetric Multiprocessing: This paradigm treats all the constituent processors
in a multiprocessor system as the same. Each processor has equal access to the
operating system, and the I/O peripherals. These are also known as SMP systems.
Asymmetric Multiprocessing: This paradigm does not treat all the constituent
processors in a multiprocessor system as the same. There is typically one master
processor that has exclusive control of the operating system and I/O devices.
It assigns work to the rest of the processors.
1.19 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Symmetric Multiprocessing Architecture
1.20 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
A Dual-Core Design
1.21 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Clustered Systems
■ Are a form of distributed systems. Composed of 2 or more independent
machines coupled together.
● Usually sharing storage via a storage-area network (SAN)
● Provides a high-availability service which survives failures
4 Asymmetric clustering has one machine in hot-standby mode while
other machine/server run applications. The hot-standby machine
only monitors the active server. If it fails, the hot-standby machine
becomes the active server.
4 Symmetric clustering has multiple nodes running applications,
monitoring each other
● Some clusters are for high-performance computing (HPC)
4 Applications must be written to use parallelization
1.22 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Operating System Structure
■ Multiprogramming needed for efficiency
● Single user cannot keep CPU and I/O devices busy at all times
● Multiprogramming organizes jobs (code and data) so CPU always has one to
execute
● A subset of total jobs in system is kept in memory
● One job selected and run via job scheduling
● When it has to wait (for I/O for example), OS switches to another job
■ Timesharing (multitasking) is logical extension in which CPU switches jobs so
frequently that users can interact with each job while it is running, creating interactive
computing
● Response time should be < 1 second
● Each user has at least one program executing in memory 🢡process
● If several jobs ready to run at the same time 🢡 CPU scheduling
● If processes don’t fit in memory, swapping moves them in and out to run
● Virtual memory allows execution of processes not completely in memory
1.23 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Memory Layout for Multiprogrammed System
1.24 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Operating-System Operations
■ Interrupt driven by hardware
■ Software error or request creates exception or trap
● Division by zero, request for operating system service
■ Other process problems include infinite loop, processes modifying each
other or the operating system
■ Dual-mode operation allows OS to protect itself and other system
components
● User mode and kernel mode
● Mode bit provided by hardware
4 Provides ability to distinguish when system is running user code or
kernel code
4 Some instructions designated as privileged, only executable in
kernel mode
4 System call changes mode to kernel, return from call resets it to
user
1.25 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
Transition from User to Kernel Mode
■ Timer to prevent infinite loop / process hogging resources
● Set interrupt after specific period
● Operating system decrements counter
● When counter zero generate an interrupt
● Set up before scheduling process to regain control or terminate program
that exceeds allotted time
1.26 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts with Java – 8th Edition
End of Chapter 1

More Related Content

Similar to ch1-IntroductiontoOS_edited.pptx

Similar to ch1-IntroductiontoOS_edited.pptx (20)

ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
Ch1
Ch1Ch1
Ch1
 
ch1.pptx
ch1.pptxch1.pptx
ch1.pptx
 
ch1.ppthjhgjhghjghjgjhgugugugmhjgh iyuyuy
ch1.ppthjhgjhghjghjgjhgugugugmhjgh iyuyuych1.ppthjhgjhghjghjgjhgugugugmhjgh iyuyuy
ch1.ppthjhgjhghjghjgjhgugugugmhjgh iyuyuy
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
cs8493 - operating systems unit 1
cs8493 - operating systems unit 1cs8493 - operating systems unit 1
cs8493 - operating systems unit 1
 
Linux operating system fundamentals of Operating System
Linux operating system fundamentals of Operating SystemLinux operating system fundamentals of Operating System
Linux operating system fundamentals of Operating System
 
Operating system introduction
Operating system introductionOperating system introduction
Operating system introduction
 
Lec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.pptLec 6 OS structure and Operations.ppt
Lec 6 OS structure and Operations.ppt
 
Introduction_to_OperatingSystems_ch1.ppt
Introduction_to_OperatingSystems_ch1.pptIntroduction_to_OperatingSystems_ch1.ppt
Introduction_to_OperatingSystems_ch1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
Ch1-Operating System Concept
Ch1-Operating System ConceptCh1-Operating System Concept
Ch1-Operating System Concept
 
Ch1-Operating System Concepts
Ch1-Operating System ConceptsCh1-Operating System Concepts
Ch1-Operating System Concepts
 
operating system of the computer/PC/laptop.pptx
operating system of the computer/PC/laptop.pptxoperating system of the computer/PC/laptop.pptx
operating system of the computer/PC/laptop.pptx
 
ch1.pdf
ch1.pdfch1.pdf
ch1.pdf
 
ch1 operating system chapter 1 to OS.pptx
ch1 operating system chapter 1  to OS.pptxch1 operating system chapter 1  to OS.pptx
ch1 operating system chapter 1 to OS.pptx
 

Recently uploaded

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 

ch1-IntroductiontoOS_edited.pptx

  • 1. 1.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Chapter 1: Introduction
  • 2. 1.2 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Md. Shafiul Alam Forhad Department of CSE CUET Introduction Presented By Course Title: Operating Systems
  • 3. 1.3 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Chapter 1: Introduction ■ What Operating Systems Do ■ Computer-System Organization ■ Computer-System Architecture ■ Operating-System Structure ■ Operating-System Operations ■ Protection and Security ■ Distributed Systems ■ Cloud Computing
  • 4. 1.4 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition 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
  • 5. 1.5 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Computer System Structure ■ Computer system can be divided into four components ● Hardware – provides basic computing resources 4 CPU, memory, I/O devices ● Operating system 4 Controls and coordinates use of hardware among various applications and users ● Application programs – define the ways in which the system resources are used to solve the computing problems of the users 4 Word processors, compilers, web browsers, database systems, video games ● Users 4 People, machines, other computers
  • 6. 1.6 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition 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. No universally accepted definition ■ “The one program running at all times on the computer” is the kernel. Everything else is either a system program (ships with the operating system) or an application program.
  • 7. 1.7 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Computer System Organization ■ Computer-system operation ● One or more CPUs, device controllers connect through common bus providing access to shared memory ● Concurrent execution of CPUs and devices competing for memory cycles
  • 8. 1.8 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Computer-System Operation ■ I/O devices and the CPU can execute concurrently ■ Each device controller is in charge of a particular device type ■ Each device controller has a local buffer ■ CPU moves data from/to main memory to/from local buffers ■ I/O is from the device to local buffer of controller ■ Device controller informs CPU that it has finished its operation by causing an interrupt Computer Startup ■ Bootstrap program is loaded at power-up or reboot ● Typically stored in ROM or EPROM, generally known as firmware ● Initializes all aspects of system including the CPU registers, device controllers, and memory contents ● Locates and loads operating system kernel and starts execution of the first process (such as “init”) and waits for events to occur.
  • 9. 1.9 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition I/O Structure ■ After I/O starts, control returns to user program without waiting for I/O completion ● System call – request to the operating system to allow user to wait for I/O completion ● Device-status table contains entry for each I/O device indicating its type, address, and state ● Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt
  • 10. 1.10 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Storage Structure ■ Main memory – only large storage media that the CPU can access directly ■ Programs and data cannot reside in main memory permanently because: ● Main memory is limited (too small) to store all programs and data permanently ● Main memory is volatile ■ So secondary storage is provided – extension of main memory that provides large nonvolatile storage capacity ■ Magnetic disks – rigid metal or glass platters covered with magnetic recording material ● Disk surface is logically divided into tracks, which are subdivided into sectors ● The disk controller determines the logical interaction between the device and the computer
  • 12. 1.12 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Storage Hierarchy ■ Storage systems organized in hierarchy by ● Speed ● Cost ● Volatility ■ The higher levels in the hierarchy are expensive but fast. As we move down the hierarchy, the cost per bit generally decreases, whereas the access time generally increases. ■ Caching – copying information into faster storage system; main memory can be viewed as a last cache for secondary storage
  • 13. 1.13 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Storage-Device Hierarchy
  • 14. 1.14 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Caching ■ Important principle, performed at many levels in a computer (in hardware, operating system, software) ■ Information in use copied from slower to faster storage temporarily ■ Faster storage (cache) checked first to determine if information is there ● If it is, information used directly from the cache (fast) ● If not, data copied to cache and used there ■ Cache smaller than storage being cached ● Cache management important design problem ● Cache size and replacement policy
  • 15. 1.15 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition How a Modern Computer Works
  • 16. 1.16 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Computer-System Architecture ■ Most systems use a single general-purpose processor ● Most systems have special-purpose processors as well ■ Multiprocessors systems growing in use and importance ● Also known as parallel systems, tightly-coupled systems ● Advantages include 1. Increased throughput 2. Economy of scale 3. Increased reliability – graceful degradation or fault tolerance ● Two types 1. Asymmetric Multiprocessing 2. Symmetric Multiprocessing
  • 17. 17 Multiprocessing ● The term multiprocessing refers to multiple processors working in parallel. This is a generic definition, and it can refer to multiple processors in the same chip, or processors across different chips. A multicore processor is a specific type of multiprocessor that contains all of its constituent processors in the same chip. Each such processor is known as a core.
  • 18. 18 Symmetric vs Asymmetric MPs Symmetric Multiprocessing: This paradigm treats all the constituent processors in a multiprocessor system as the same. Each processor has equal access to the operating system, and the I/O peripherals. These are also known as SMP systems. Asymmetric Multiprocessing: This paradigm does not treat all the constituent processors in a multiprocessor system as the same. There is typically one master processor that has exclusive control of the operating system and I/O devices. It assigns work to the rest of the processors.
  • 19. 1.19 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Symmetric Multiprocessing Architecture
  • 20. 1.20 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition A Dual-Core Design
  • 21. 1.21 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Clustered Systems ■ Are a form of distributed systems. Composed of 2 or more independent machines coupled together. ● Usually sharing storage via a storage-area network (SAN) ● Provides a high-availability service which survives failures 4 Asymmetric clustering has one machine in hot-standby mode while other machine/server run applications. The hot-standby machine only monitors the active server. If it fails, the hot-standby machine becomes the active server. 4 Symmetric clustering has multiple nodes running applications, monitoring each other ● Some clusters are for high-performance computing (HPC) 4 Applications must be written to use parallelization
  • 22. 1.22 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Operating System Structure ■ Multiprogramming needed for efficiency ● Single user cannot keep CPU and I/O devices busy at all times ● Multiprogramming organizes jobs (code and data) so CPU always has one to execute ● A subset of total jobs in system is kept in memory ● One job selected and run via job scheduling ● When it has to wait (for I/O for example), OS switches to another job ■ Timesharing (multitasking) is logical extension in which CPU switches jobs so frequently that users can interact with each job while it is running, creating interactive computing ● Response time should be < 1 second ● Each user has at least one program executing in memory 🢡process ● If several jobs ready to run at the same time 🢡 CPU scheduling ● If processes don’t fit in memory, swapping moves them in and out to run ● Virtual memory allows execution of processes not completely in memory
  • 23. 1.23 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Memory Layout for Multiprogrammed System
  • 24. 1.24 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Operating-System Operations ■ Interrupt driven by hardware ■ Software error or request creates exception or trap ● Division by zero, request for operating system service ■ Other process problems include infinite loop, processes modifying each other or the operating system ■ Dual-mode operation allows OS to protect itself and other system components ● User mode and kernel mode ● Mode bit provided by hardware 4 Provides ability to distinguish when system is running user code or kernel code 4 Some instructions designated as privileged, only executable in kernel mode 4 System call changes mode to kernel, return from call resets it to user
  • 25. 1.25 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition Transition from User to Kernel Mode ■ Timer to prevent infinite loop / process hogging resources ● Set interrupt after specific period ● Operating system decrements counter ● When counter zero generate an interrupt ● Set up before scheduling process to regain control or terminate program that exceeds allotted time
  • 26. 1.26 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8th Edition End of Chapter 1