SlideShare a Scribd company logo
2013.04.03
ASL @ KAU
Contents




What is operating system?
History of OS
Input / Output






Storage structure






Software polling
Interrupt
Memory mapped
Cache
Locality of reference

OS basics
Process structure

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
What is Operating System?


An Operating System is the interface between
the users and the hardware.


It implements a virtual machine that is easier to program
than bare hardware

MOV EAX, EBX
1101011010101

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
What is Operating System?


An Operating System is the interface between
the users and the hardware.


It implements a virtual machine that is easier to program
than bare hardware

A=B

MOV EAX, EBX

return

1101011010101

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
What is Operating System?


An OS provides standard services (an interface)
which are implemented on the hardware.


Including Processes, CPU Scheduling, Memory managem
ent, File system, Networking…
UI

UI

UI

UI

UI

Device IO

Device IO

Device IO

Device IO

Device IO

Graphic

Graphic

Graphic

Graphic

Graphic

Network

Network

Network

Network

Network

File IO

File IO

File IO

File IO

File IO

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
What is Operating System?


An OS provides standard services (an interface)
which are implemented on the hardware.


Including Processes, CPU Scheduling, Memory managem
ent, File system, Networking…
UI

UI

UI

UI

UI

Device IO

Device IO

Device IO

Device IO

Device IO

Graphic

Graphic

Graphic

Graphic

Graphic

Network

Network

Network

Network

Network

File IO

File IO

File IO

File IO

File IO

Aerosystem Software Lab. @ Korea Aerospace Univ

System Call

http://asl.kau.ac.kr
What is Operating System?


Magician

4GB



2GB

Government

x

Aerosystem Software Lab. @ Korea Aerospace Univ

x

http://asl.kau.ac.kr
The Goal of OS


Convenient




Software engineering problem

Efficient


System engineering problem

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
Why study Operating System?


Abstraction





How do we give the users the illusion of infinity resource?
(CPU time, Memory, File space)

System Design


Tradeoff
Performance

Convenience

Performance

Abstraction

Simplicity

OS

Hardware

Software

Functionality
Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
History of OS (Phase 0)


HW is a very expensive experiment, No OS


One function at a time






Aerosystem Software Lab. @ Korea Aerospace Univ

Computation
I/O
User think/response

Program loaded via card deck

http://asl.kau.ac.kr
History of OS (Phase 1)



Hardware is expensive, Humans are cheap
Simple Batch processing






Load program
Run
Print result
Dump
Start
Wait for Jobs
Load New Job

Execute Job

Yes

Aerosystem Software Lab. @ Korea Aerospace Univ

Next Job?

No

http://asl.kau.ac.kr
History of OS (Phase 1)


Overlapped CPU & I/O operations




CPU Don’t need to wait till I/O Finishes
More effective usage of Hardware

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
History of OS (Phase 1)


Multi-programmed batch system






Looks like programs are running simultaneously
Pick some jobs to run (scheduling)
Put jobs in memory (memory management)

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
History of OS (Phase 2)


Hardware is less expensive than before,
Humans are becoming expensive


Interactive Timesharing





Preemptive scheduling to maintain adequate response time
Avoid Thrashing (program swap in, out)

UNIX developed at Bell Lab

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
History of OS (Phase 3)


Hardware is very cheap, Humans are expensive


Personal Computer (Macintosh)



Aerosystem Software Lab. @ Korea Aerospace Univ

Return to simplicity
No more supporting
 Multiprogramming
 Concurrency
 Protection

http://asl.kau.ac.kr
History of OS (Phase 4)



Hardware are very cheap, but speed has limit
Parallel
 Distributed




Multi-core processors
GPU





Cluster
Grid
Cloud

Shared Memory
Computer

Computer
CPU

CPU

CPU

Computer
Computer

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
Other OS


Real-time Operating System


Often used as a control device in a dedicated application








Controlling scientific experiments
Medical imaging systems
Industrial control systems
And some display systems.

Well-defined fixed-time constraints.
Real-Time systems may be either hard or soft real-time




Hard real-time
 Failure cause injury or loss of money
Soft real-time
 Failure is not much critical than hard real-time

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
Input / Output


CPU and device controllers all use a common
bus for communication






Data bus
Address bus
Control bus

Ex. Put your hands up!




Put : Control
Your hands : Address
Up : Data

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
I/O


Synchronous I/O






CPU execution waits while
I/O proceeds
Easy to implement
Ex. Software polling

Asynchronous I/O




I/O proceeds concurrently
with CPU execution
More effective I/O
Ex. Interrupt

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
I/O type (Software polling)


Software polling synchronous I/O



CPU starts an I/O operation, and continuously polls
(checks) that device until the I/O operation finishes
Device controller contains registers for communication






Input, Output Register
 for data
Control Register
 to tell it what to do
Status Register
 to see what it’s done

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
I/O type (Interrupt)


Device controller has its own processor,
and executes asynchronously with CPU



Device controller puts an interrupt signal on the bus
when it needs CPU’s attention
When CPU receive an interrupt
1.

2.

3.

It saves the CPU state and invokes the
appropriate interrupt handler using the
interrupt vector
Handler must save and restore
software state
CPU restores CPU state

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
I/O type (Interrupt)


Interrupt timeline



Trap (software generated interrupt)




Kernel mode
System call

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
I/O Type (Memory mapped I/O)


Direct Memory Access


I/O device can transfer block of data to / from memory
without going through CPU
I/O Command

CPU
data

I/O device
data

Memory

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
Storage Structure


Memory is not much fast
as what we think





Tradeoff between
size and speed
So we use caching

Where to cache?




Cache up block requires a lot of time
than accessing memory
If cache miss ratio is high, no need to
use cache system
Locality of reference

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
Locality of Reference

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
Hardware, Software, Middleware

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
3 main process in Kernel


Scheduler




Pager





Multi-Tasking

Memory Management
Cache

Swapper


Virtual Memory

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
User mode, Kernel mode



Kernel has core functions.
User applications has algorithm for jobs.

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr
Process structure


4 main area


Text




Data





Global variable
Static variable

BSS




Program Code

Heap

Stack


Function frame stack

Aerosystem Software Lab. @ Korea Aerospace Univ

http://asl.kau.ac.kr

More Related Content

Viewers also liked

work order of logic laboratory
work order of logic laboratory work order of logic laboratory
work order of logic laboratory
FS Karimi
 
Lab2
Lab2Lab2
Programs for Operating System
Programs for Operating SystemPrograms for Operating System
Programs for Operating SystemLPU
 
Lab manual operating system [cs 502 rgpv] (usefulsearch.org) (useful search)
Lab manual operating system [cs 502 rgpv] (usefulsearch.org)  (useful search)Lab manual operating system [cs 502 rgpv] (usefulsearch.org)  (useful search)
Lab manual operating system [cs 502 rgpv] (usefulsearch.org) (useful search)
Make Mannan
 
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programs
Kandarp Tiwari
 
O.s. lab all_experimets
O.s. lab all_experimetsO.s. lab all_experimets
O.s. lab all_experimets
Guru Janbheshver University, Hisar
 
Ooad lab manual
Ooad lab manualOoad lab manual
Ooad lab manual
Umamurthi Umamurthi
 
Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)
dipenpatelpatel
 
ipv6 introduction & environment buildup
ipv6 introduction & environment buildupipv6 introduction & environment buildup
ipv6 introduction & environment builduppsychesnet Hsieh
 
Operating system lab manual
Operating system lab manualOperating system lab manual
Operating system lab manual
Meerut Institute of Technology
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
Luca Berardinelli
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instruction
Sanjeev Patel
 
MATLAB programs Power System Simulation lab (Electrical Engineer)
MATLAB programs Power System Simulation  lab (Electrical Engineer)MATLAB programs Power System Simulation  lab (Electrical Engineer)
MATLAB programs Power System Simulation lab (Electrical Engineer)
Mathankumar S
 
Bank Database Project
Bank Database ProjectBank Database Project
Bank Database Project
DavidPerley
 

Viewers also liked (20)

work order of logic laboratory
work order of logic laboratory work order of logic laboratory
work order of logic laboratory
 
Lab2
Lab2Lab2
Lab2
 
Gun make
Gun makeGun make
Gun make
 
Programs for Operating System
Programs for Operating SystemPrograms for Operating System
Programs for Operating System
 
Os file
Os fileOs file
Os file
 
Lab manual operating system [cs 502 rgpv] (usefulsearch.org) (useful search)
Lab manual operating system [cs 502 rgpv] (usefulsearch.org)  (useful search)Lab manual operating system [cs 502 rgpv] (usefulsearch.org)  (useful search)
Lab manual operating system [cs 502 rgpv] (usefulsearch.org) (useful search)
 
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programs
 
O.s. lab all_experimets
O.s. lab all_experimetsO.s. lab all_experimets
O.s. lab all_experimets
 
FFmpeg
FFmpegFFmpeg
FFmpeg
 
Openssl
OpensslOpenssl
Openssl
 
Ooad lab manual
Ooad lab manualOoad lab manual
Ooad lab manual
 
Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)
 
ipv6 introduction & environment buildup
ipv6 introduction & environment buildupipv6 introduction & environment buildup
ipv6 introduction & environment buildup
 
Operating system lab manual
Operating system lab manualOperating system lab manual
Operating system lab manual
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
 
Os lab manual
Os lab manualOs lab manual
Os lab manual
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instruction
 
MATLAB programs Power System Simulation lab (Electrical Engineer)
MATLAB programs Power System Simulation  lab (Electrical Engineer)MATLAB programs Power System Simulation  lab (Electrical Engineer)
MATLAB programs Power System Simulation lab (Electrical Engineer)
 
Bank Database Project
Bank Database ProjectBank Database Project
Bank Database Project
 

Similar to OS tutoring #1

Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
Taufeeq8
 
operating system over view.ppt operating sysyems
operating system over view.ppt operating sysyemsoperating system over view.ppt operating sysyems
operating system over view.ppt operating sysyems
JyoReddy9
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1sphs
 
Operating systems. replace ch1 with numbers for next chapters
Operating systems. replace ch1 with numbers for next chaptersOperating systems. replace ch1 with numbers for next chapters
Operating systems. replace ch1 with numbers for next chapterssphs
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - IntroductionWayne Jones Jnr
 
Operating Systems Part I-Basics
Operating Systems Part I-BasicsOperating Systems Part I-Basics
Operating Systems Part I-Basics
Ajit Nayak
 
Autosar Basics hand book_v1
Autosar Basics  hand book_v1Autosar Basics  hand book_v1
Autosar Basics hand book_v1
Keroles karam khalil
 
OPERATING SYSTEM
OPERATING SYSTEM OPERATING SYSTEM
OPERATING SYSTEM
Khehra Saab
 
Docs_CSEOSLNotes2013.pdf
Docs_CSEOSLNotes2013.pdfDocs_CSEOSLNotes2013.pdf
Docs_CSEOSLNotes2013.pdf
GGESBachianwali
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
Wayne Jones Jnr
 
15. Computer Systems Basic Software 1
15. Computer Systems   Basic Software 115. Computer Systems   Basic Software 1
15. Computer Systems Basic Software 1New Era University
 
OS Intro.ppt
OS Intro.pptOS Intro.ppt
OS Intro.ppt
ssuserd97416
 
OS UNIT-I Introdution to Operating systems.ppt
OS UNIT-I Introdution to Operating systems.pptOS UNIT-I Introdution to Operating systems.ppt
OS UNIT-I Introdution to Operating systems.ppt
KVBALARAMAKRISHNA
 
Operating system (BCS303) MODULE 1 NOTES
Operating system (BCS303) MODULE 1 NOTESOperating system (BCS303) MODULE 1 NOTES
Operating system (BCS303) MODULE 1 NOTES
KopinathMURUGESAN
 
Ch13 OS
Ch13 OSCh13 OS
Ch13 OSC.U
 
ch1.ppt
ch1.pptch1.ppt
Io system
Io systemIo system
Io system
Hero Prabhu
 

Similar to OS tutoring #1 (20)

Lecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdfLecture1,2,3 (1).pdf
Lecture1,2,3 (1).pdf
 
operating system over view.ppt operating sysyems
operating system over view.ppt operating sysyemsoperating system over view.ppt operating sysyems
operating system over view.ppt operating sysyems
 
Ch1
Ch1Ch1
Ch1
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1
 
Operating systems. replace ch1 with numbers for next chapters
Operating systems. replace ch1 with numbers for next chaptersOperating systems. replace ch1 with numbers for next chapters
Operating systems. replace ch1 with numbers for next chapters
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
 
Operating Systems Part I-Basics
Operating Systems Part I-BasicsOperating Systems Part I-Basics
Operating Systems Part I-Basics
 
Autosar Basics hand book_v1
Autosar Basics  hand book_v1Autosar Basics  hand book_v1
Autosar Basics hand book_v1
 
OPERATING SYSTEM
OPERATING SYSTEM OPERATING SYSTEM
OPERATING SYSTEM
 
Docs_CSEOSLNotes2013.pdf
Docs_CSEOSLNotes2013.pdfDocs_CSEOSLNotes2013.pdf
Docs_CSEOSLNotes2013.pdf
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
 
15. Computer Systems Basic Software 1
15. Computer Systems   Basic Software 115. Computer Systems   Basic Software 1
15. Computer Systems Basic Software 1
 
OS Intro.ppt
OS Intro.pptOS Intro.ppt
OS Intro.ppt
 
OS UNIT-I Introdution to Operating systems.ppt
OS UNIT-I Introdution to Operating systems.pptOS UNIT-I Introdution to Operating systems.ppt
OS UNIT-I Introdution to Operating systems.ppt
 
Operating system (BCS303) MODULE 1 NOTES
Operating system (BCS303) MODULE 1 NOTESOperating system (BCS303) MODULE 1 NOTES
Operating system (BCS303) MODULE 1 NOTES
 
OSCh13
OSCh13OSCh13
OSCh13
 
Ch13 OS
Ch13 OSCh13 OS
Ch13 OS
 
OS_Ch13
OS_Ch13OS_Ch13
OS_Ch13
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
Io system
Io systemIo system
Io system
 

Recently uploaded

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 

Recently uploaded (20)

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 

OS tutoring #1

  • 2. Contents    What is operating system? History of OS Input / Output     Storage structure     Software polling Interrupt Memory mapped Cache Locality of reference OS basics Process structure Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 3. What is Operating System?  An Operating System is the interface between the users and the hardware.  It implements a virtual machine that is easier to program than bare hardware MOV EAX, EBX 1101011010101 Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 4. What is Operating System?  An Operating System is the interface between the users and the hardware.  It implements a virtual machine that is easier to program than bare hardware A=B MOV EAX, EBX return 1101011010101 Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 5. What is Operating System?  An OS provides standard services (an interface) which are implemented on the hardware.  Including Processes, CPU Scheduling, Memory managem ent, File system, Networking… UI UI UI UI UI Device IO Device IO Device IO Device IO Device IO Graphic Graphic Graphic Graphic Graphic Network Network Network Network Network File IO File IO File IO File IO File IO Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 6. What is Operating System?  An OS provides standard services (an interface) which are implemented on the hardware.  Including Processes, CPU Scheduling, Memory managem ent, File system, Networking… UI UI UI UI UI Device IO Device IO Device IO Device IO Device IO Graphic Graphic Graphic Graphic Graphic Network Network Network Network Network File IO File IO File IO File IO File IO Aerosystem Software Lab. @ Korea Aerospace Univ System Call http://asl.kau.ac.kr
  • 7. What is Operating System?  Magician 4GB  2GB Government x Aerosystem Software Lab. @ Korea Aerospace Univ x http://asl.kau.ac.kr
  • 8. The Goal of OS  Convenient   Software engineering problem Efficient  System engineering problem Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 9. Why study Operating System?  Abstraction    How do we give the users the illusion of infinity resource? (CPU time, Memory, File space) System Design  Tradeoff Performance Convenience Performance Abstraction Simplicity OS Hardware Software Functionality Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 10. History of OS (Phase 0)  HW is a very expensive experiment, No OS  One function at a time     Aerosystem Software Lab. @ Korea Aerospace Univ Computation I/O User think/response Program loaded via card deck http://asl.kau.ac.kr
  • 11. History of OS (Phase 1)   Hardware is expensive, Humans are cheap Simple Batch processing     Load program Run Print result Dump Start Wait for Jobs Load New Job Execute Job Yes Aerosystem Software Lab. @ Korea Aerospace Univ Next Job? No http://asl.kau.ac.kr
  • 12. History of OS (Phase 1)  Overlapped CPU & I/O operations   CPU Don’t need to wait till I/O Finishes More effective usage of Hardware Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 13. History of OS (Phase 1)  Multi-programmed batch system    Looks like programs are running simultaneously Pick some jobs to run (scheduling) Put jobs in memory (memory management) Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 14. History of OS (Phase 2)  Hardware is less expensive than before, Humans are becoming expensive  Interactive Timesharing    Preemptive scheduling to maintain adequate response time Avoid Thrashing (program swap in, out) UNIX developed at Bell Lab Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 15. History of OS (Phase 3)  Hardware is very cheap, Humans are expensive  Personal Computer (Macintosh)   Aerosystem Software Lab. @ Korea Aerospace Univ Return to simplicity No more supporting  Multiprogramming  Concurrency  Protection http://asl.kau.ac.kr
  • 16. History of OS (Phase 4)   Hardware are very cheap, but speed has limit Parallel  Distributed   Multi-core processors GPU    Cluster Grid Cloud Shared Memory Computer Computer CPU CPU CPU Computer Computer Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 17. Other OS  Real-time Operating System  Often used as a control device in a dedicated application       Controlling scientific experiments Medical imaging systems Industrial control systems And some display systems. Well-defined fixed-time constraints. Real-Time systems may be either hard or soft real-time   Hard real-time  Failure cause injury or loss of money Soft real-time  Failure is not much critical than hard real-time Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 18. Input / Output  CPU and device controllers all use a common bus for communication     Data bus Address bus Control bus Ex. Put your hands up!    Put : Control Your hands : Address Up : Data Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 19. I/O  Synchronous I/O     CPU execution waits while I/O proceeds Easy to implement Ex. Software polling Asynchronous I/O    I/O proceeds concurrently with CPU execution More effective I/O Ex. Interrupt Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 20. I/O type (Software polling)  Software polling synchronous I/O   CPU starts an I/O operation, and continuously polls (checks) that device until the I/O operation finishes Device controller contains registers for communication    Input, Output Register  for data Control Register  to tell it what to do Status Register  to see what it’s done Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 21. I/O type (Interrupt)  Device controller has its own processor, and executes asynchronously with CPU   Device controller puts an interrupt signal on the bus when it needs CPU’s attention When CPU receive an interrupt 1. 2. 3. It saves the CPU state and invokes the appropriate interrupt handler using the interrupt vector Handler must save and restore software state CPU restores CPU state Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 22. I/O type (Interrupt)  Interrupt timeline  Trap (software generated interrupt)   Kernel mode System call Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 23. I/O Type (Memory mapped I/O)  Direct Memory Access  I/O device can transfer block of data to / from memory without going through CPU I/O Command CPU data I/O device data Memory Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 24. Storage Structure  Memory is not much fast as what we think    Tradeoff between size and speed So we use caching Where to cache?    Cache up block requires a lot of time than accessing memory If cache miss ratio is high, no need to use cache system Locality of reference Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 25. Locality of Reference Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 26. Hardware, Software, Middleware Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 27. 3 main process in Kernel  Scheduler   Pager    Multi-Tasking Memory Management Cache Swapper  Virtual Memory Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 28. User mode, Kernel mode   Kernel has core functions. User applications has algorithm for jobs. Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr
  • 29. Process structure  4 main area  Text   Data    Global variable Static variable BSS   Program Code Heap Stack  Function frame stack Aerosystem Software Lab. @ Korea Aerospace Univ http://asl.kau.ac.kr