SlideShare a Scribd company logo
1 of 29
Download to read offline
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
 
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 programsKandarp Tiwari
 
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
 
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/2015Luca Berardinelli
 
Memory reference instruction
Memory reference instructionMemory reference instruction
Memory reference instructionSanjeev 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 ProjectDavidPerley
 

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).pdfTaufeeq8
 
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 sysyemsJyoReddy9
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1sphs
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - IntroductionWayne Jones Jnr
 
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
 
Operating Systems Part I-Basics
Operating Systems Part I-BasicsOperating Systems Part I-Basics
Operating Systems Part I-BasicsAjit Nayak
 
OPERATING SYSTEM
OPERATING SYSTEM OPERATING SYSTEM
OPERATING SYSTEM Khehra Saab
 
Docs_CSEOSLNotes2013.pdf
Docs_CSEOSLNotes2013.pdfDocs_CSEOSLNotes2013.pdf
Docs_CSEOSLNotes2013.pdfGGESBachianwali
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O SystemsWayne 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 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.pptKVBALARAMAKRISHNA
 
Operating system (BCS303) MODULE 1 NOTES
Operating system (BCS303) MODULE 1 NOTESOperating system (BCS303) MODULE 1 NOTES
Operating system (BCS303) MODULE 1 NOTESKopinathMURUGESAN
 
Ch13 OS
Ch13 OSCh13 OS
Ch13 OSC.U
 

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
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
 
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
 
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
 
OS_Ch13
OS_Ch13OS_Ch13
OS_Ch13
 
Ch13 OS
Ch13 OSCh13 OS
Ch13 OS
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
Io system
Io systemIo system
Io system
 

Recently uploaded

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

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