operating system concepts

Download Operating  system concepts

Post on 25-Feb-2016

56 views

Category:

Documents

4 download

Embed Size (px)

DESCRIPTION

Operating system concepts. Lin Zhong ELEC424, Fall 2010. Outline. What is operating system? Important OS concepts Embedded OS. What is OS?. Different ways of computing implementation. Data Input (1100101000). Output (0101101010). Fully customized circuit. - PowerPoint PPT Presentation

TRANSCRIPT

Operating system concepts

Operating system conceptsLin ZhongELEC424, Fall 2010OutlineWhat is operating system?

Important OS concepts

Embedded OS

2What is OS?Different ways of computing implementation3Data Input (1100101000)Output (0101101010)Fully customized circuitData Input (1100101000)Output (0101101010)Control Input (1100101000)Programmable circuit (Processor)Program in high-level languageCompilation

Program in high-level languageProgram in high-level languageExecutable/binary3What is OS? (Contd.)A modern computer system4Output (0101101010)Control Input (1100101000)Programmable circuit (Processor)Data Input (1100101000)

Hard diskBIOSPrecompiled binariesBasic I/O system to jumpstartWhat is OS?Software that manages the sharing of the resources of a computer---WikipediaSharing by what?Independent executables (programs)What resources?Time-shared resources: CPU and networkSpace-shared resources: memory and diskExhaustible: energy

5OS conceptsScheduling (Process management)Memory managementFile systemNetworkingDevice driversPower management

6SchedulingProcessWiki: An instance (execution) of a computer program that is being sequentially executedWiki: a collection of instructions that describes a task, or set of tasks, to be carried out by a computerRunning program???Execution of a single control flow7be done00000010 10000000 00000000 00000110addcc%r1,-4,%r110000010 10000000 01111111 11111100addcc%r1,%r2,%r410001000 10000000 01000000 00000010ld%r4,%r511001010 00000001 00000000 00000000ba loop00010000 10111111 11111111 11111011addcc%r3,%r5,%r310000110 10000000 11000000 00000101Scheduling (Contd.)8

Physical computerProcesses

OS creates the illusion that every process can own the whole computerScheduling (Contd.)9Time-sharing of CPUAdmission control Long-term schedulingMemory loading Mid-term schedulingWho gets the CPU Short-term schedulingPriorityPreemptiveReal-timeReadyRunBlockedProcess statusThread vs. Process10

Physical computerProcesses

OS creates the illusion that every process can own the whole computer

Threads share the resources that is designated to a single processProcess: execution of a single control flowProcess: execution of multiple control flows that share the system resourceMemory managementStorage hierarchyVirtual memoryExtend main memory beyond RAMShare memory space between processesOrganized in pages64KBPage tablesTranslation lookaside buffer (TLB)11CPUCacheRegistersMain memory (RAM)Hard diskMemory management & scheduling12ReadyRunBlockedProcess statusBinary in main memoryCan get swapped out to diskFile systemOrganize the massive storageDirectoriesFilesFlash file systemBlock-wise eraseFinite # of erase-write cycles (100K times)Spread erase-write evenly (wear levelling)

13CPUCacheRegistersMain memoryHard diskFile system cacheApplicationTransportData linkPhysicalNetworkNetworking14ApplicationPresentationSessionTransportData linkPhysicalNetworkOSI reference modelPriority/Express/ Registration/PackagesZip code, street addressTraffic regulationHow to drive a mail truckFind the best route (Google map)TCP/IP modelIMAP, HTTPTCP, UDPCSMACDMA, TDMAIPUSPS analogy

Device driversHardware abstractionProvide standard API for applicationsShare peripheral devices

Even battery has a driver15No direct energy managementEnergy accountingHow much energy has been consumedBattery energy modelHow much energy is left on batterySystem energy modelHow much energy is consumed by a component or an activity

16Power managementAdvanced Configuration and Power Interface (ACPI)Industrial standard17Tian et al, 2007

P-States7 global statesG0-G3G1: S1-S44 CPU statesC0-C3Up to 16 Performance statesPn4 device statesD0-D3Real-time operating system (RTOS)Guarantee meeting the hard deadlinesLinux, Windows, Unix,. are NOT RTOSGreen HillsINTEGRITYJoint-strike fighterEurofighter TyphoonWind RiverVxWork 653 (Boeing 787)LynuxWorksLynxOS (Boeing 777 cabin service system)QNXAutomotives

18

http://www.ghs.com/CustomerGallery.html18Smartphone Oses19Source: Gartnerhttp://www.intomobile.com/2009/03/13/mobile-os-market-share-stats-confirm-rim-apple-leading-the-charge.html19Industrial profile22ICSystem integration/manufactureOperating systemApplicationsMicrosoftSamsung, LG, HTC, Moto, NokiaAppleTI, ARM, MIPS (Digital), QualcomBroadcom, Marvel (RF, Analog)Verizon, Sprint, AT&T etc.RIM (Blackberry)ServicesPalmSymbianOwned by NokiaARM processors only

Target of multiple phone viruses

Moving toward open-source23Embedded LinuxLinuxInitiated by Linus Torvalds (Swedish Finnish) (but named after Linus Pauling, an American)Google AndroidPalm WebOSMeego (Nokia/Intel)MontaVista LinuxMost older Motorola Linux phones

Trolltech Greenphone24

OS for small embedded systems25Often proprietaryIn-house simple OS-like firmware TinyOS is big for networked sensors Open source (http://www.tinyos.net/)Runs on microcontrollers like MSP430

New developmentAll driven by more computing power26ExecutablesOSHardwareExecutablesOS1HardwareVirtualizationOS2ExecutablesIntermediatesOS1HardwareVirtualizationOS2IntermediatesRun-timeRun-time