SlideShare a Scribd company logo
1 of 22
Download to read offline
Hardware Basics
Beuth Hochschule

Summer Term 2014
Operating Systems I PT / FF 14
Computer Systems Today
2
Users
Application Programs
System Programs
Operating System
Firmware
Hardware
Controlexecution
ofprograms
Abstractfrom
hardware
Operating Systems I PT / FF 14
Classes of Operating Systems
• Desktop / Server Operating Systems
• Distributed Operating Systems
• Implements a single operating system instance spanning multiple machines

• Applications have single memory space view

• No significant real-world adoption, mainly research topic

• Real-Time Operating System (RTOS)
• Deterministic timing behavior of operating system services

• Support for real-time application scheduling and resource management

• Wide adoption for industry applications

• Examples: LynxOS, OSE, QNX, RTLinux, VxWorks 

• Embedded Operating System
3
Operating Systems I PT / FF 14
Main Concepts
• Processes

• Process table, core image, fork, command interpreter,
shell, child processes, scheduling, signals, user
authorization, group identification, process tree, ...

• Memory

• Swapping, paging, segmentation, virtual address,
security, device access, ...

• I/O

• Files, directories, root directory, working directory,
path, protection, rwx bits, file descriptor, handle,
special files, I/O devices, block I/O, character I/O,
standard input/output/error, pipes, mailslots,
sockets, ...

• ... all abstracting hardware concepts to some extend
4
Main Concepts:Main Concepts: pprorocecessessess
ProProccesseessess, process table, core image, process table, core image
Command interpreter, shellCommand interpreter, shell
Child processesChild processes
A
B C
41
Scheduling, signalsScheduling, signals
User identification, group identificationUser identification, group identification
ready running
blocked
finishednew
B C
FED
Process tree
Main Concepts:Main Concepts: pprorocece
ProProccesseessess, process table, core, process table, core
Command interpreter, shellCommand interpreter, shell
Child processesChild processes
Scheduling, signalsScheduling, signals
User identification, group identifUser identification, group identif
ready running
blocked
finishednew
Main Concepts:Main Concepts: FilesFiles
Files, directories, rootFiles, directories, root
Path, working directoryPath, working directory
Protection, rwx bitsProtection, rwx bits
File descriptor, handleFile descriptor, handle
Root directory
tmp usretc
42
File descriptor, handleFile descriptor, handle
Special files, I/O devicesSpecial files, I/O devices
Block I/O, character I/OBlock I/O, character I/O
Standard input/output/errorStandard input/output/error
pipespipes
pitmia
Operating Systems I PT / FF 14
Hardware Basics
5
Operating Systems I PT / FF 14
Hardware Basics
• Central Processing Units (CPUs) + volatile
memory + I/O devices

• Fetch instruction and execute it - typically
memory access, computation, and / or I/O
6
(C) Stallings
• I/O devices and memory controller may
interrupt the instruction processing

• Improve processor utilization by
asynchronous operations
Operating Systems I PT / FF 14
Hardware Basics
• Symmetric Multi-Processing (SMP)

• Two or more processors in 

one system, can perform the 

same operations (symmetric)

• Processors share the same 

main memory and all devices

• Increased performance and 

scalability for multi-tasking

• No master, any processor can cause another to reschedule

• Multi-Core / many-core processor combines computational cores 

on one chip with shared caches

• Challenges for an SMP operating system: 

• Reentrant kernel, scheduling policies, synchronization, memory re-use, ...
7
(C) Stallings
Operating Systems I PT / FF 14
Hardware Basics
• Multi-Programming vs. multi-processing
8
Operating Systems I PT / FF 14
Hardware Basics
• Hyperthreading

• Make a single processor appear
to be two virtual processors by
maintaining separate CPU
states, while execution engine
and caches are still shared

• Also called Simultaneous
multithreading (SMT)
• Operating systems must
consider them separately in
scheduling 

(in Windows since XP)
9
(C) Intel
Operating Systems I PT / FF 14
Hardware Basics
• Parallelism

• Inside the processor
(instruction-level
parallelism, multicore)

• Through multiple
processors in one
machine
(multiprocessing)

• Through multiple
machines
(multicomputer)
10
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
"#$%&'()!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
*)#+(,,#)!"-.%!
!
!
!
!
!
"#$%&'/'.#0/1!
203.0(!
4/,5!
4/,5!
4/,5!
4/,5!
!"#$%
&"'"(()(*#+%
,-#.'/0.*1-%
2.')"+%
6#3.+/1!!
*)#+(,,#)!
6#3.+/1!
*)#+(,,#)!
"-.%!7&1'.84-)(/9.03!:"74;!
<=$$(').+!7&1'.8*)#+(,,.03!:<7*;!
7&1'.+#$%&'()!
!
!
!
!
!
"#$%&'/'.#0/1!
203.0(!
6#3.+/1!
*)#+(,,#)!
6#3.+/1!
*)#+(,,#)!
*)#+(,,#)!"-.%!
>>>!
>>>!
"#$%&'()!
"-.%!7&1'.8*)#+(,,.03!:"7*;!
>>>!
<.$&1'/0(#&,!
7&1'.84-)(/9.03!
:<74;!
?0,')&+'.#086(@(1!
%/)/11(1.,$!:?6*;!
A/'/!
A/'/!
A/'/!
A/'/!
3"."%
&"'"(()(*#+%
%
%
Figure 1: Hardware parallelism hierarchy
Operating Systems I PT / FF 14
Hardware Basics
11
Intel Core i7
SPARC64™ VIIIfx 12
SPARC64™ VIIIfx
•
•
•
•
Core5
Core4
Core1
Core0
Core7
Core6
Core3
Core2
DDR3interface
DDR3interface
L2$ Data
L2$ Data
HSIO
L2$ ControlMAC
MAC
MAC
MAC
SPARC64 VIIIfx
Operating Systems I PT / FF 14
Hardware Basics
• NUMA (non uniform memory architecture) systems

• Groups of physical processors (called “nodes”) that have local memory	 

• Connected to the larger system through a cache-coherent interconnect bus 

• Still an SMP system (e.g. any processor can access all of memory),

but node-local memory is faster

• Operating system tries to schedule close activities on the same node

• Became the default model in all recent architectures
12
Processor A Processor B
Cache Cache
Memory
Processor C Processor D
Cache Cache
Memory
High-Speed
Interconnect
Operating Systems I PT / FF 14
Hardware Basics
13
Core Core
Core Core
Q
P
I
Core Core
Core Core
Q
P
I
Core Core
Core Core
Q
P
I
Core Core
Core Core
Q
P
I
L3CacheL3Cache
L3Cache
MemoryController
MemoryControllerMemoryController
L3Cache
MemoryController
I/O I/O
I/OI/O
MemoryMemory
MemoryMemory
Intel Nehalem
Operating Systems I PT / FF 14
Hardware Basics
• Major constraints in memory as a resource are amount, speed, and costs

• Faster access time results in greater costs per bit

• Greater capacity results in smaller costs per bit

• Greater capacity results in slower access 

• Idea: Going down a memory hierarchy

• Decreasing costs per bit

• Increasing capacity for fixed costs

• Increasing access time
14
http://tjliu.myweb.hinet.net/
Operating Systems I PT / FF 14
(C) Stallings
Hardware Basics
• Principle of Locality

• Memory referenced by a processor (program and data) tends to cluster

• Iterative loops and subroutines, small set of instructions inside

• Operations on tables and arrays involve access to 

clustered data sets

• Data should be organized so that the percentage of 

accesses to lower levels is substantially less than to 

the level above

• Typically implemented by caching concept

• I/O devices provide non-volatile memory

on lower levels, which is an additional advantage
15
Operating Systems I PT / FF 14
Hardware Basics
• Caching

• Offer a portion of lower level memory
as copy in the faster smaller memory

• Leverages the principle of locality

• Processor caches work in hardware,
but must be considered by an
operating system
16
(C) Stallings
Operating Systems I PT / FF 14
Hardware Basics
• Conflicting caching design goals

• Cache size per level

• Number of cache levels

• Block size exchanged with

lower level memory

• Replacement algorithm

• Mapping function

• Write policy for modified 

cache lines

• All decisions made by hardware

vendor, considerable by software
17
(C) Stallings
Operating Systems I PT / FF 14
Hardware Basics
• All computers have mechanisms to let I/O and memory modules interrupt the current
processor work

• Consider the speed aspect of I/O devices in the memory hierarchy

• Different classes of interrupt

• Program interrupt: Condition from program execution leads to exceptional
situation, such as arithmetic overflow, division by zero, illegal instruction

• Timer interrupt: Programmed hardware time signals the time event,

e.g. for regular operating system activities

• I/O interrupt: Generated by any kind of hardware unit to signal I/O completion or
an error condition

• Hardware failure interrupt: Hardware module signals permanent issue
18
Operating Systems I PT / FF 14
Hardware Basics
19
• I/O program prepares an I/O
operation, waits for
finalization and prepares the
result for further processing

• Usage of interrupts reduces
the application I/O wait time
to the pre- and post phases
of I/O processing

• Interrupt can occur at any
point in the execution of the
user program, must be
managed by the operating
system
Operating Systems I PT / FF 14
Hardware Basics
20
Operating Systems I PT / FF 14
Hardware Basics
• Summary

• Modern operating systems have to deal with many execution units (cores) and
processors (SMP) in the same box

• Memory is organized in a deep hierarchy

• Differences in speed and amount at the order of magnitudes

• Devices and other sources can interrupt the current processing at any point

• All of this is permanently changing

• New processors, memory technology, hardware devices, ...

• Operating system must allow applications to use old and new hardware

• Example: Windows Vista supports approx. 4200 printers out of the box
21
Any problem in computer science can be solved
with another layer of indirection.
But that usually will create another problem.
David Wheeler

More Related Content

What's hot

Computer system architecture
Computer system architectureComputer system architecture
Computer system architectureKumar
 
Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating Systempriya_sinha02
 
introduction to operating system
introduction to operating systemintroduction to operating system
introduction to operating systemHAMZA AHMED
 
Operating Systems 1 (5/12) - Architectures (Unix)
Operating Systems 1 (5/12) - Architectures (Unix)Operating Systems 1 (5/12) - Architectures (Unix)
Operating Systems 1 (5/12) - Architectures (Unix)Peter Tröger
 
Bba i-introduction to computer-u-3-functions operating systems
Bba  i-introduction to computer-u-3-functions operating systemsBba  i-introduction to computer-u-3-functions operating systems
Bba i-introduction to computer-u-3-functions operating systemsRai University
 
Operating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputOperating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputPeter Tröger
 
Overview of various types of operating system
Overview of various types of operating systemOverview of various types of operating system
Overview of various types of operating systemUmme habiba
 
How Operating system works.
How Operating system works. How Operating system works.
How Operating system works. Fahad Farooq
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)NehaTadam
 
Operating Systems
Operating SystemsOperating Systems
Operating Systemsvampugani
 
ITFT_Device management in Operating System
ITFT_Device management in Operating SystemITFT_Device management in Operating System
ITFT_Device management in Operating SystemSneh Prabha
 
Operating Systems As a Product
Operating Systems As a ProductOperating Systems As a Product
Operating Systems As a ProductHarshit Srivastava
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmwareJoel P
 
Unit 1 introduction to os
Unit 1 introduction to osUnit 1 introduction to os
Unit 1 introduction to osGaneshThapa27
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system conceptsVaibhav Khanna
 
Operating systems types, spooling and buffering
Operating systems types, spooling and bufferingOperating systems types, spooling and buffering
Operating systems types, spooling and bufferingAyush Jain
 

What's hot (20)

Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating System
 
Opearating System
Opearating  SystemOpearating  System
Opearating System
 
introduction to operating system
introduction to operating systemintroduction to operating system
introduction to operating system
 
Operating Systems 1 (5/12) - Architectures (Unix)
Operating Systems 1 (5/12) - Architectures (Unix)Operating Systems 1 (5/12) - Architectures (Unix)
Operating Systems 1 (5/12) - Architectures (Unix)
 
Bba i-introduction to computer-u-3-functions operating systems
Bba  i-introduction to computer-u-3-functions operating systemsBba  i-introduction to computer-u-3-functions operating systems
Bba i-introduction to computer-u-3-functions operating systems
 
Operating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / OutputOperating Systems 1 (11/12) - Input / Output
Operating Systems 1 (11/12) - Input / Output
 
Overview of various types of operating system
Overview of various types of operating systemOverview of various types of operating system
Overview of various types of operating system
 
How Operating system works.
How Operating system works. How Operating system works.
How Operating system works.
 
An Introduction to Operating Systems
An Introduction to Operating SystemsAn Introduction to Operating Systems
An Introduction to Operating Systems
 
Operating system
Operating systemOperating system
Operating system
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
ITFT_Device management in Operating System
ITFT_Device management in Operating SystemITFT_Device management in Operating System
ITFT_Device management in Operating System
 
Operating Systems As a Product
Operating Systems As a ProductOperating Systems As a Product
Operating Systems As a Product
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmware
 
Unit 1 introduction to os
Unit 1 introduction to osUnit 1 introduction to os
Unit 1 introduction to os
 
Os
OsOs
Os
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
 
Operating systems types, spooling and buffering
Operating systems types, spooling and bufferingOperating systems types, spooling and buffering
Operating systems types, spooling and buffering
 

Viewers also liked

Cloud Standards and Virtualization
Cloud Standards and VirtualizationCloud Standards and Virtualization
Cloud Standards and VirtualizationPeter Tröger
 
Operating Systems 1 (3/12) - Architectures
Operating Systems 1 (3/12) - ArchitecturesOperating Systems 1 (3/12) - Architectures
Operating Systems 1 (3/12) - ArchitecturesPeter Tröger
 
Operating system
Operating systemOperating system
Operating systemasmakh89
 
Operating Systems 1 (8/12) - Concurrency
Operating Systems 1 (8/12) - ConcurrencyOperating Systems 1 (8/12) - Concurrency
Operating Systems 1 (8/12) - ConcurrencyPeter Tröger
 
Windows 10 - tools-tools-tools
Windows 10 - tools-tools-toolsWindows 10 - tools-tools-tools
Windows 10 - tools-tools-toolsRoel van Bueren
 
Operating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - ThreadsOperating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - ThreadsPeter Tröger
 
Part 04 Creating a System Call in Linux
Part 04 Creating a System Call in LinuxPart 04 Creating a System Call in Linux
Part 04 Creating a System Call in LinuxTushar B Kute
 
Linux Performance Tools
Linux Performance ToolsLinux Performance Tools
Linux Performance ToolsBrendan Gregg
 
Computer Generation Presentation
Computer Generation PresentationComputer Generation Presentation
Computer Generation PresentationJayesh Modi
 
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkTEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkVolker Hirsch
 

Viewers also liked (14)

Cloud Standards and Virtualization
Cloud Standards and VirtualizationCloud Standards and Virtualization
Cloud Standards and Virtualization
 
Operating Systems 1 (3/12) - Architectures
Operating Systems 1 (3/12) - ArchitecturesOperating Systems 1 (3/12) - Architectures
Operating Systems 1 (3/12) - Architectures
 
Chapter01 new
Chapter01 newChapter01 new
Chapter01 new
 
Operating system
Operating systemOperating system
Operating system
 
Operating Systems 1 (8/12) - Concurrency
Operating Systems 1 (8/12) - ConcurrencyOperating Systems 1 (8/12) - Concurrency
Operating Systems 1 (8/12) - Concurrency
 
Windows 10 - tools-tools-tools
Windows 10 - tools-tools-toolsWindows 10 - tools-tools-tools
Windows 10 - tools-tools-tools
 
Operating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - ThreadsOperating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - Threads
 
Part 04 Creating a System Call in Linux
Part 04 Creating a System Call in LinuxPart 04 Creating a System Call in Linux
Part 04 Creating a System Call in Linux
 
Interrupts
Interrupts Interrupts
Interrupts
 
Linux Performance Tools
Linux Performance ToolsLinux Performance Tools
Linux Performance Tools
 
An introduction to Windows 10
An introduction to Windows 10 An introduction to Windows 10
An introduction to Windows 10
 
Computer Generation Presentation
Computer Generation PresentationComputer Generation Presentation
Computer Generation Presentation
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkTEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of Work
 

Similar to Hardware Basics for Operating Systems

Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesPeter Tröger
 
Operating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsOperating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsPeter Tröger
 
MK Sistem Operasi.pdf
MK Sistem Operasi.pdfMK Sistem Operasi.pdf
MK Sistem Operasi.pdfwisard1
 
Kernel security Concepts
Kernel security ConceptsKernel security Concepts
Kernel security ConceptsMohit Saxena
 
Computer Architecture & Organization.ppt
Computer Architecture & Organization.pptComputer Architecture & Organization.ppt
Computer Architecture & Organization.pptFarhanaMariyam1
 
Operating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingOperating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingPeter Tröger
 
Introduction to Operating Systems.pdf
Introduction to Operating Systems.pdfIntroduction to Operating Systems.pdf
Introduction to Operating Systems.pdfHarika Pudugosula
 
Computer system organization
Computer system organizationComputer system organization
Computer system organizationSyed Zaid Irshad
 

Similar to Hardware Basics for Operating Systems (20)

Lec 2
Lec 2Lec 2
Lec 2
 
Os introduction
Os introductionOs introduction
Os introduction
 
Os introduction
Os introductionOs introduction
Os introduction
 
Operating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - ProcessesOperating Systems 1 (6/12) - Processes
Operating Systems 1 (6/12) - Processes
 
Operating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management ConceptsOperating Systems 1 (9/12) - Memory Management Concepts
Operating Systems 1 (9/12) - Memory Management Concepts
 
MK Sistem Operasi.pdf
MK Sistem Operasi.pdfMK Sistem Operasi.pdf
MK Sistem Operasi.pdf
 
chapter1.ppt
chapter1.pptchapter1.ppt
chapter1.ppt
 
Kernel security Concepts
Kernel security ConceptsKernel security Concepts
Kernel security Concepts
 
Computer Architecture & Organization.ppt
Computer Architecture & Organization.pptComputer Architecture & Organization.ppt
Computer Architecture & Organization.ppt
 
Ch12 io systems
Ch12   io systemsCh12   io systems
Ch12 io systems
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
Operating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - SchedulingOperating Systems 1 (10/12) - Scheduling
Operating Systems 1 (10/12) - Scheduling
 
5120224.ppt
5120224.ppt5120224.ppt
5120224.ppt
 
Chapter01 (1).ppt
Chapter01 (1).pptChapter01 (1).ppt
Chapter01 (1).ppt
 
Ch1 introduction
Ch1   introductionCh1   introduction
Ch1 introduction
 
unit1 part1.ppt
unit1 part1.pptunit1 part1.ppt
unit1 part1.ppt
 
Introduction to Operating Systems.pdf
Introduction to Operating Systems.pdfIntroduction to Operating Systems.pdf
Introduction to Operating Systems.pdf
 
Lec 3
Lec 3 Lec 3
Lec 3
 
OS Content.pdf
OS Content.pdfOS Content.pdf
OS Content.pdf
 
Computer system organization
Computer system organizationComputer system organization
Computer system organization
 

More from Peter Tröger

WannaCry - An OS course perspective
WannaCry - An OS course perspectiveWannaCry - An OS course perspective
WannaCry - An OS course perspectivePeter Tröger
 
Distributed Resource Management Application API (DRMAA) Version 2
Distributed Resource Management Application API (DRMAA) Version 2Distributed Resource Management Application API (DRMAA) Version 2
Distributed Resource Management Application API (DRMAA) Version 2Peter Tröger
 
OpenSubmit - How to grade 1200 code submissions
OpenSubmit - How to grade 1200 code submissionsOpenSubmit - How to grade 1200 code submissions
OpenSubmit - How to grade 1200 code submissionsPeter Tröger
 
Design of Software for Embedded Systems
Design of Software for Embedded SystemsDesign of Software for Embedded Systems
Design of Software for Embedded SystemsPeter Tröger
 
Humans should not write XML.
Humans should not write XML.Humans should not write XML.
Humans should not write XML.Peter Tröger
 
What activates a bug? A refinement of the Laprie terminology model.
What activates a bug? A refinement of the Laprie terminology model.What activates a bug? A refinement of the Laprie terminology model.
What activates a bug? A refinement of the Laprie terminology model.Peter Tröger
 
Dependable Systems - Summary (16/16)
Dependable Systems - Summary (16/16)Dependable Systems - Summary (16/16)
Dependable Systems - Summary (16/16)Peter Tröger
 
Dependable Systems - Hardware Dependability with Redundancy (14/16)
Dependable Systems - Hardware Dependability with Redundancy (14/16)Dependable Systems - Hardware Dependability with Redundancy (14/16)
Dependable Systems - Hardware Dependability with Redundancy (14/16)Peter Tröger
 
Dependable Systems - System Dependability Evaluation (8/16)
Dependable Systems - System Dependability Evaluation (8/16)Dependable Systems - System Dependability Evaluation (8/16)
Dependable Systems - System Dependability Evaluation (8/16)Peter Tröger
 
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Peter Tröger
 
Dependable Systems -Software Dependability (15/16)
Dependable Systems -Software Dependability (15/16)Dependable Systems -Software Dependability (15/16)
Dependable Systems -Software Dependability (15/16)Peter Tröger
 
Dependable Systems -Reliability Prediction (9/16)
Dependable Systems -Reliability Prediction (9/16)Dependable Systems -Reliability Prediction (9/16)
Dependable Systems -Reliability Prediction (9/16)Peter Tröger
 
Dependable Systems -Fault Tolerance Patterns (4/16)
Dependable Systems -Fault Tolerance Patterns (4/16)Dependable Systems -Fault Tolerance Patterns (4/16)
Dependable Systems -Fault Tolerance Patterns (4/16)Peter Tröger
 
Dependable Systems - Introduction (1/16)
Dependable Systems - Introduction (1/16)Dependable Systems - Introduction (1/16)
Dependable Systems - Introduction (1/16)Peter Tröger
 
Dependable Systems -Dependability Means (3/16)
Dependable Systems -Dependability Means (3/16)Dependable Systems -Dependability Means (3/16)
Dependable Systems -Dependability Means (3/16)Peter Tröger
 
Dependable Systems - Hardware Dependability with Diagnosis (13/16)
Dependable Systems - Hardware Dependability with Diagnosis (13/16)Dependable Systems - Hardware Dependability with Diagnosis (13/16)
Dependable Systems - Hardware Dependability with Diagnosis (13/16)Peter Tröger
 
Dependable Systems -Dependability Attributes (5/16)
Dependable Systems -Dependability Attributes (5/16)Dependable Systems -Dependability Attributes (5/16)
Dependable Systems -Dependability Attributes (5/16)Peter Tröger
 
Dependable Systems -Dependability Threats (2/16)
Dependable Systems -Dependability Threats (2/16)Dependable Systems -Dependability Threats (2/16)
Dependable Systems -Dependability Threats (2/16)Peter Tröger
 
Verteilte Software-Systeme im Kontext von Industrie 4.0
Verteilte Software-Systeme im Kontext von Industrie 4.0Verteilte Software-Systeme im Kontext von Industrie 4.0
Verteilte Software-Systeme im Kontext von Industrie 4.0Peter Tröger
 
Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)Peter Tröger
 

More from Peter Tröger (20)

WannaCry - An OS course perspective
WannaCry - An OS course perspectiveWannaCry - An OS course perspective
WannaCry - An OS course perspective
 
Distributed Resource Management Application API (DRMAA) Version 2
Distributed Resource Management Application API (DRMAA) Version 2Distributed Resource Management Application API (DRMAA) Version 2
Distributed Resource Management Application API (DRMAA) Version 2
 
OpenSubmit - How to grade 1200 code submissions
OpenSubmit - How to grade 1200 code submissionsOpenSubmit - How to grade 1200 code submissions
OpenSubmit - How to grade 1200 code submissions
 
Design of Software for Embedded Systems
Design of Software for Embedded SystemsDesign of Software for Embedded Systems
Design of Software for Embedded Systems
 
Humans should not write XML.
Humans should not write XML.Humans should not write XML.
Humans should not write XML.
 
What activates a bug? A refinement of the Laprie terminology model.
What activates a bug? A refinement of the Laprie terminology model.What activates a bug? A refinement of the Laprie terminology model.
What activates a bug? A refinement of the Laprie terminology model.
 
Dependable Systems - Summary (16/16)
Dependable Systems - Summary (16/16)Dependable Systems - Summary (16/16)
Dependable Systems - Summary (16/16)
 
Dependable Systems - Hardware Dependability with Redundancy (14/16)
Dependable Systems - Hardware Dependability with Redundancy (14/16)Dependable Systems - Hardware Dependability with Redundancy (14/16)
Dependable Systems - Hardware Dependability with Redundancy (14/16)
 
Dependable Systems - System Dependability Evaluation (8/16)
Dependable Systems - System Dependability Evaluation (8/16)Dependable Systems - System Dependability Evaluation (8/16)
Dependable Systems - System Dependability Evaluation (8/16)
 
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
Dependable Systems - Structure-Based Dependabiilty Modeling (6/16)
 
Dependable Systems -Software Dependability (15/16)
Dependable Systems -Software Dependability (15/16)Dependable Systems -Software Dependability (15/16)
Dependable Systems -Software Dependability (15/16)
 
Dependable Systems -Reliability Prediction (9/16)
Dependable Systems -Reliability Prediction (9/16)Dependable Systems -Reliability Prediction (9/16)
Dependable Systems -Reliability Prediction (9/16)
 
Dependable Systems -Fault Tolerance Patterns (4/16)
Dependable Systems -Fault Tolerance Patterns (4/16)Dependable Systems -Fault Tolerance Patterns (4/16)
Dependable Systems -Fault Tolerance Patterns (4/16)
 
Dependable Systems - Introduction (1/16)
Dependable Systems - Introduction (1/16)Dependable Systems - Introduction (1/16)
Dependable Systems - Introduction (1/16)
 
Dependable Systems -Dependability Means (3/16)
Dependable Systems -Dependability Means (3/16)Dependable Systems -Dependability Means (3/16)
Dependable Systems -Dependability Means (3/16)
 
Dependable Systems - Hardware Dependability with Diagnosis (13/16)
Dependable Systems - Hardware Dependability with Diagnosis (13/16)Dependable Systems - Hardware Dependability with Diagnosis (13/16)
Dependable Systems - Hardware Dependability with Diagnosis (13/16)
 
Dependable Systems -Dependability Attributes (5/16)
Dependable Systems -Dependability Attributes (5/16)Dependable Systems -Dependability Attributes (5/16)
Dependable Systems -Dependability Attributes (5/16)
 
Dependable Systems -Dependability Threats (2/16)
Dependable Systems -Dependability Threats (2/16)Dependable Systems -Dependability Threats (2/16)
Dependable Systems -Dependability Threats (2/16)
 
Verteilte Software-Systeme im Kontext von Industrie 4.0
Verteilte Software-Systeme im Kontext von Industrie 4.0Verteilte Software-Systeme im Kontext von Industrie 4.0
Verteilte Software-Systeme im Kontext von Industrie 4.0
 
Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)Operating Systems 1 (4/12) - Architectures (Windows)
Operating Systems 1 (4/12) - Architectures (Windows)
 

Recently uploaded

Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

Hardware Basics for Operating Systems

  • 2. Operating Systems I PT / FF 14 Computer Systems Today 2 Users Application Programs System Programs Operating System Firmware Hardware Controlexecution ofprograms Abstractfrom hardware
  • 3. Operating Systems I PT / FF 14 Classes of Operating Systems • Desktop / Server Operating Systems • Distributed Operating Systems • Implements a single operating system instance spanning multiple machines • Applications have single memory space view • No significant real-world adoption, mainly research topic • Real-Time Operating System (RTOS) • Deterministic timing behavior of operating system services • Support for real-time application scheduling and resource management • Wide adoption for industry applications • Examples: LynxOS, OSE, QNX, RTLinux, VxWorks • Embedded Operating System 3
  • 4. Operating Systems I PT / FF 14 Main Concepts • Processes • Process table, core image, fork, command interpreter, shell, child processes, scheduling, signals, user authorization, group identification, process tree, ... • Memory • Swapping, paging, segmentation, virtual address, security, device access, ... • I/O • Files, directories, root directory, working directory, path, protection, rwx bits, file descriptor, handle, special files, I/O devices, block I/O, character I/O, standard input/output/error, pipes, mailslots, sockets, ... • ... all abstracting hardware concepts to some extend 4 Main Concepts:Main Concepts: pprorocecessessess ProProccesseessess, process table, core image, process table, core image Command interpreter, shellCommand interpreter, shell Child processesChild processes A B C 41 Scheduling, signalsScheduling, signals User identification, group identificationUser identification, group identification ready running blocked finishednew B C FED Process tree Main Concepts:Main Concepts: pprorocece ProProccesseessess, process table, core, process table, core Command interpreter, shellCommand interpreter, shell Child processesChild processes Scheduling, signalsScheduling, signals User identification, group identifUser identification, group identif ready running blocked finishednew Main Concepts:Main Concepts: FilesFiles Files, directories, rootFiles, directories, root Path, working directoryPath, working directory Protection, rwx bitsProtection, rwx bits File descriptor, handleFile descriptor, handle Root directory tmp usretc 42 File descriptor, handleFile descriptor, handle Special files, I/O devicesSpecial files, I/O devices Block I/O, character I/OBlock I/O, character I/O Standard input/output/errorStandard input/output/error pipespipes pitmia
  • 5. Operating Systems I PT / FF 14 Hardware Basics 5
  • 6. Operating Systems I PT / FF 14 Hardware Basics • Central Processing Units (CPUs) + volatile memory + I/O devices • Fetch instruction and execute it - typically memory access, computation, and / or I/O 6 (C) Stallings • I/O devices and memory controller may interrupt the instruction processing • Improve processor utilization by asynchronous operations
  • 7. Operating Systems I PT / FF 14 Hardware Basics • Symmetric Multi-Processing (SMP) • Two or more processors in 
 one system, can perform the 
 same operations (symmetric) • Processors share the same 
 main memory and all devices • Increased performance and 
 scalability for multi-tasking • No master, any processor can cause another to reschedule • Multi-Core / many-core processor combines computational cores 
 on one chip with shared caches • Challenges for an SMP operating system: • Reentrant kernel, scheduling policies, synchronization, memory re-use, ... 7 (C) Stallings
  • 8. Operating Systems I PT / FF 14 Hardware Basics • Multi-Programming vs. multi-processing 8
  • 9. Operating Systems I PT / FF 14 Hardware Basics • Hyperthreading • Make a single processor appear to be two virtual processors by maintaining separate CPU states, while execution engine and caches are still shared • Also called Simultaneous multithreading (SMT) • Operating systems must consider them separately in scheduling 
 (in Windows since XP) 9 (C) Intel
  • 10. Operating Systems I PT / FF 14 Hardware Basics • Parallelism • Inside the processor (instruction-level parallelism, multicore) • Through multiple processors in one machine (multiprocessing) • Through multiple machines (multicomputer) 10 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! "#$%&'()! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! *)#+(,,#)!"-.%! ! ! ! ! ! "#$%&'/'.#0/1! 203.0(! 4/,5! 4/,5! 4/,5! 4/,5! !"#$% &"'"(()(*#+% ,-#.'/0.*1-% 2.')"+% 6#3.+/1!! *)#+(,,#)! 6#3.+/1! *)#+(,,#)! "-.%!7&1'.84-)(/9.03!:"74;! <=$$(').+!7&1'.8*)#+(,,.03!:<7*;! 7&1'.+#$%&'()! ! ! ! ! ! "#$%&'/'.#0/1! 203.0(! 6#3.+/1! *)#+(,,#)! 6#3.+/1! *)#+(,,#)! *)#+(,,#)!"-.%! >>>! >>>! "#$%&'()! "-.%!7&1'.8*)#+(,,.03!:"7*;! >>>! <.$&1'/0(#&,! 7&1'.84-)(/9.03! :<74;! ?0,')&+'.#086(@(1! %/)/11(1.,$!:?6*;! A/'/! A/'/! A/'/! A/'/! 3"."% &"'"(()(*#+% % % Figure 1: Hardware parallelism hierarchy
  • 11. Operating Systems I PT / FF 14 Hardware Basics 11 Intel Core i7 SPARC64™ VIIIfx 12 SPARC64™ VIIIfx • • • • Core5 Core4 Core1 Core0 Core7 Core6 Core3 Core2 DDR3interface DDR3interface L2$ Data L2$ Data HSIO L2$ ControlMAC MAC MAC MAC SPARC64 VIIIfx
  • 12. Operating Systems I PT / FF 14 Hardware Basics • NUMA (non uniform memory architecture) systems • Groups of physical processors (called “nodes”) that have local memory • Connected to the larger system through a cache-coherent interconnect bus • Still an SMP system (e.g. any processor can access all of memory),
 but node-local memory is faster • Operating system tries to schedule close activities on the same node • Became the default model in all recent architectures 12 Processor A Processor B Cache Cache Memory Processor C Processor D Cache Cache Memory High-Speed Interconnect
  • 13. Operating Systems I PT / FF 14 Hardware Basics 13 Core Core Core Core Q P I Core Core Core Core Q P I Core Core Core Core Q P I Core Core Core Core Q P I L3CacheL3Cache L3Cache MemoryController MemoryControllerMemoryController L3Cache MemoryController I/O I/O I/OI/O MemoryMemory MemoryMemory Intel Nehalem
  • 14. Operating Systems I PT / FF 14 Hardware Basics • Major constraints in memory as a resource are amount, speed, and costs • Faster access time results in greater costs per bit • Greater capacity results in smaller costs per bit • Greater capacity results in slower access • Idea: Going down a memory hierarchy • Decreasing costs per bit • Increasing capacity for fixed costs • Increasing access time 14 http://tjliu.myweb.hinet.net/
  • 15. Operating Systems I PT / FF 14 (C) Stallings Hardware Basics • Principle of Locality • Memory referenced by a processor (program and data) tends to cluster • Iterative loops and subroutines, small set of instructions inside • Operations on tables and arrays involve access to 
 clustered data sets • Data should be organized so that the percentage of 
 accesses to lower levels is substantially less than to 
 the level above • Typically implemented by caching concept • I/O devices provide non-volatile memory
 on lower levels, which is an additional advantage 15
  • 16. Operating Systems I PT / FF 14 Hardware Basics • Caching • Offer a portion of lower level memory as copy in the faster smaller memory • Leverages the principle of locality • Processor caches work in hardware, but must be considered by an operating system 16 (C) Stallings
  • 17. Operating Systems I PT / FF 14 Hardware Basics • Conflicting caching design goals • Cache size per level • Number of cache levels • Block size exchanged with
 lower level memory • Replacement algorithm • Mapping function • Write policy for modified 
 cache lines • All decisions made by hardware
 vendor, considerable by software 17 (C) Stallings
  • 18. Operating Systems I PT / FF 14 Hardware Basics • All computers have mechanisms to let I/O and memory modules interrupt the current processor work • Consider the speed aspect of I/O devices in the memory hierarchy • Different classes of interrupt • Program interrupt: Condition from program execution leads to exceptional situation, such as arithmetic overflow, division by zero, illegal instruction • Timer interrupt: Programmed hardware time signals the time event,
 e.g. for regular operating system activities • I/O interrupt: Generated by any kind of hardware unit to signal I/O completion or an error condition • Hardware failure interrupt: Hardware module signals permanent issue 18
  • 19. Operating Systems I PT / FF 14 Hardware Basics 19 • I/O program prepares an I/O operation, waits for finalization and prepares the result for further processing • Usage of interrupts reduces the application I/O wait time to the pre- and post phases of I/O processing • Interrupt can occur at any point in the execution of the user program, must be managed by the operating system
  • 20. Operating Systems I PT / FF 14 Hardware Basics 20
  • 21. Operating Systems I PT / FF 14 Hardware Basics • Summary • Modern operating systems have to deal with many execution units (cores) and processors (SMP) in the same box • Memory is organized in a deep hierarchy • Differences in speed and amount at the order of magnitudes • Devices and other sources can interrupt the current processing at any point • All of this is permanently changing • New processors, memory technology, hardware devices, ... • Operating system must allow applications to use old and new hardware • Example: Windows Vista supports approx. 4200 printers out of the box 21
  • 22. Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler