Download - Operating system concepts
![Page 1: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/1.jpg)
Operating system concepts
Lin ZhongELEC424, Fall 2010
![Page 2: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/2.jpg)
Outline
• What is operating system?
• Important OS concepts
• Embedded OS
2
![Page 3: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/3.jpg)
What is OS?• Different ways of computing implementation
3
Data Input (1100101000) Output
(0101101010)Fully customized circuit
Data Input (1100101000)
Output (0101101010)
Control Input (1100101000)
Programmable circuit (Processor)
Program in high-level language
Compilation
Program in high-level language
Program in high-level language
Executable/binary
![Page 4: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/4.jpg)
What is OS? (Contd.)• A modern computer system
4
Output (0101101010)
Control Input (1100101000)
Programmable circuit (Processor)
Data Input (1100101000)
Hard disk
BIOS
Precompiled binaries
Basic I/O system to jumpstart
![Page 5: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/5.jpg)
What is OS?
• “Software that manages the sharing of the resources of a computer”---Wikipedia– Sharing by what?
• Independent executables (programs)– What resources?
• Time-shared resources: CPU and network• Space-shared resources: memory and disk• Exhaustible: energy
5
![Page 6: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/6.jpg)
OS concepts
• Scheduling (Process management)• Memory management• File system• Networking• Device drivers• Power management
6
![Page 7: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/7.jpg)
Scheduling• Process
– Wiki: An instance (execution) of a computer program that is being sequentially executed
• Wiki: a collection of instructions that describes a task, or set of tasks, to be carried out by a computer
– Running program???• Execution of a single control flow
7
be done 00000010 10000000 00000000 00000110addcc %r1,-4,%r1 10000010 10000000 01111111 11111100addcc %r1,%r2,%r4 10001000 10000000 01000000 00000010ld %r4,%r5 11001010 00000001 00000000 00000000ba loop 00010000 10111111 11111111 11111011addcc %r3,%r5,%r3 10000110 10000000 11000000 00000101
![Page 8: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/8.jpg)
Scheduling (Contd.)
8
Physical computer
Processes
OS creates the illusion that every process can own the whole computer
![Page 9: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/9.jpg)
Scheduling (Contd.)
9
Time-sharing of CPU Admission control
Long-term scheduling Memory loading
Mid-term scheduling Who gets the CPU
Short-term scheduling Priority Preemptive Real-time
Ready
Run Blocked
Process status
![Page 10: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/10.jpg)
Thread vs. Process
10
Physical computer
Processes
OS creates the illusion that every process can own the whole computer
Threads share the resources that is designated to a single process
Process: execution of a single control flow
Process: execution of multiple control flows that share the system resource
![Page 11: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/11.jpg)
Memory management• Storage hierarchy• Virtual memory
– Extend main memory beyond RAM– Share memory space between
processes– Organized in “pages”
• 64KB• Page tables• Translation lookaside buffer (TLB)
11
CPUCache
Registers
Main memory (RAM)
Hard disk
![Page 12: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/12.jpg)
Memory management & scheduling
12
Ready
Run Blocked
Process status
Binary in main memory
Can get “swapped” out to disk
![Page 13: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/13.jpg)
File system• Organize the massive storage
– Directories– Files
• Flash file system– Block-wise erase– Finite # of erase-write cycles (100K
times)• Spread erase-write evenly (wear
levelling)
13
CPUCache
Registers
Main memory
Hard disk
File system cache
![Page 14: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/14.jpg)
Application
Transport
Data link
Physical
Network
Networking
14
Application
Presentation
Session
Transport
Data link
Physical
Network
OSI reference model
Priority/Express/ Registration/Packages
Zip code, street address
Traffic regulation
How to drive a mail truck
Find the best route (Google map)
TCP/IP model
IMAP, HTTP
TCP, UDP
CSMA
CDMA, TDMA
IP
USPS analogy
![Page 15: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/15.jpg)
Device drivers
• Hardware abstraction– Provide standard API for applications
• Share peripheral devices
• Even battery has a driver
15
![Page 16: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/16.jpg)
No direct energy management
• Energy accounting– How much energy has been consumed
• Battery energy model– How much energy is left on battery
• System energy model– How much energy is consumed by a component or
an activity
16
![Page 17: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/17.jpg)
Power management• Advanced Configuration and Power Interface (ACPI)
– Industrial standard
17Tian et al, 2007
P-States
•7 global states• G0-G3• G1: S1-S4
•4 CPU states• C0-C3
•Up to 16 Performance states
• Pn•4 device states
• D0-D3
![Page 18: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/18.jpg)
Real-time operating system (RTOS)• Guarantee meeting the hard deadlines• Linux, Windows, Unix,…. are NOT RTOS• Green Hills
– INTEGRITY• Joint-strike fighter• Eurofighter Typhoon
• Wind River– VxWork 653 (Boeing 787)
• LynuxWorks– LynxOS (Boeing 777 cabin service system)
• QNX– Automotives
18
![Page 19: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/19.jpg)
Smartphone Oses
19
SymbianRIM
Windows Mobile
OS X Linux
Palm OS Others
2007
Symbian
RIM
Windows Mobile
OS X
Linux
Palm OS Others
2008
Source: Gartner
![Page 20: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/20.jpg)
46.9
3.9
19.9
14.4
8.76.1
2009
SymbianAndroidRIMiOSWindowsOthers
![Page 21: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/21.jpg)
40.1
17.7
17.5
15.4
4.74.7
2010
SymbianAndroidRIMiOSWindowsOthers
![Page 22: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/22.jpg)
Industrial profile
22
IC
System integration/manufacture
Operating system
Applications
Microsoft
Samsung, LG, HTC, Moto,…
NokiaApple
TI, ARM, MIPS (Digital), QualcomBroadcom, Marvel (RF, Analog)
Verizon, Sprint, AT&T etc.
RIM (Blackberry)
Services
Palm
![Page 23: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/23.jpg)
Symbian• Owned by Nokia• ARM processors only
• Target of multiple phone viruses
• Moving toward open-source
23
![Page 24: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/24.jpg)
Embedded Linux• Linux
– Initiated by Linus Torvalds (Swedish Finnish) (but named after Linus Pauling, an American)
• Google Android• Palm WebOS• Meego (Nokia/Intel)• MontaVista Linux
– Most older Motorola Linux phones
• Trolltech Greenphone
24
![Page 25: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/25.jpg)
OS for small embedded systems
25
• Often proprietary– In-house simple OS-like firmware
• TinyOS is big for networked sensors – Open source (http://www.tinyos.net/)– Runs on microcontrollers like MSP430
![Page 26: Operating system concepts](https://reader036.vdocument.in/reader036/viewer/2022062302/56816936550346895de0978d/html5/thumbnails/26.jpg)
New development• All driven by more computing power
26
Executables
OS
Hardware
Executables
OS1
Hardware
VirtualizationOS2
ExecutablesIntermediates
OS1
Hardware
VirtualizationOS2
Intermediates
Run-time Run-time