opera ng systems principles and prac ce
play

Opera&ng Systems: Principles and Prac&ce Tom - PowerPoint PPT Presentation

Opera&ng Systems: Principles and Prac&ce Tom Anderson How This Course Fits in the UW CSE Curriculum CSE 333: Systems Programming Project


  1. Opera&ng ¡Systems: ¡ ¡ Principles ¡and ¡Prac&ce ¡ Tom ¡Anderson ¡

  2. How ¡This ¡Course ¡Fits ¡in ¡the ¡UW ¡CSE ¡ Curriculum ¡ • CSE ¡333: ¡Systems ¡Programming ¡ – Project ¡experience ¡in ¡C/C++ ¡ – How ¡to ¡use ¡the ¡opera&ng ¡system ¡interface ¡ • CSE ¡451: ¡Opera&ng ¡Systems ¡ – How ¡to ¡make ¡a ¡single ¡computer ¡work ¡reliably ¡ – How ¡an ¡opera&ng ¡system ¡works ¡internally ¡ • CSE ¡452: ¡Distributed ¡Systems ¡ – How ¡to ¡make ¡a ¡set ¡of ¡computers ¡work ¡reliably, ¡ despite ¡failures ¡of ¡some ¡nodes ¡

  3. Project: ¡OS/161 ¡ • Build ¡an ¡opera&ng ¡system ¡ ¡ – That ¡can ¡boot ¡on ¡a ¡mul&processor ¡ • We ¡give ¡you ¡some ¡basic ¡building ¡blocks ¡ – Three ¡assignments, ¡that ¡build ¡on ¡each ¡other ¡ • Threads, ¡user ¡programs, ¡virtual ¡memory ¡ – Work ¡in ¡ groups ¡of ¡2-­‑3 ¡ (recommend ¡ 3 !) ¡ • Instruc&ons ¡on ¡web ¡page ¡ – Download ¡and ¡browse ¡code ¡before ¡sec&on ¡ – Bring ¡laptop ¡or ¡smartphone ¡to ¡sec&on ¡ • Assignment ¡0 ¡due ¡ next ¡ Thursday ¡

  4. Problem ¡Sets ¡ • Two ¡parts, ¡equivalent ¡to ¡a ¡final ¡ – Done ¡ individually ¡

  5. Main ¡Points ¡(for ¡today) ¡ • Opera&ng ¡system ¡defini&on ¡ – SoZware ¡to ¡manage ¡a ¡computer’s ¡resources ¡for ¡its ¡ users ¡and ¡applica&ons ¡ • OS ¡challenges ¡ – Reliability, ¡security, ¡responsiveness, ¡portability, ¡… ¡ • OS ¡history ¡ – How ¡are ¡OS ¡X, ¡iOS, ¡Windows ¡10, ¡Android, ¡and ¡ Linux ¡related? ¡

  6. Users What ¡is ¡an ¡ opera&ng ¡system? ¡ User-mode APP APP APP • SoZware ¡to ¡ System System System Library Library Library manage ¡a ¡ Kernel-user Interface Kernel-mode (Abstract virtual machine) computer’s ¡ File System Virtual Memory resources ¡for ¡its ¡ TCP/IP Networking Scheduling users ¡and ¡ Hardware Abstraction Layer applica&ons ¡ Hardware-Specific Software and Device Drivers Hardware Processors Address Translation Disk Graphics Processor Network

  7. Opera&ng ¡System ¡Roles ¡ • Referee: ¡ – Resource ¡alloca&on ¡among ¡users, ¡applica&ons ¡ – Isola&on ¡of ¡different ¡users, ¡applica&ons ¡from ¡each ¡other ¡ – Communica&on ¡between ¡users, ¡applica&ons ¡ • Illusionist ¡ – Each ¡applica&on ¡appears ¡to ¡have ¡the ¡en&re ¡machine ¡to ¡ itself ¡ – Infinite ¡number ¡of ¡processors, ¡(near) ¡infinite ¡amount ¡of ¡ memory, ¡reliable ¡storage, ¡reliable ¡network ¡transport ¡ • Glue ¡ – Libraries, ¡user ¡interface ¡widgets, ¡… ¡

  8. Example: ¡File ¡Systems ¡ • Referee ¡ – Prevent ¡users ¡from ¡accessing ¡each ¡other’s ¡files ¡ without ¡permission ¡ – Even ¡aZer ¡a ¡file ¡is ¡deleted ¡and ¡its ¡space ¡re-­‑used ¡ • Illusionist ¡ – Files ¡can ¡grow ¡(nearly) ¡arbitrarily ¡large ¡ – Files ¡persist ¡even ¡when ¡the ¡machine ¡crashes ¡in ¡the ¡ middle ¡of ¡a ¡save ¡ • Glue ¡ – Named ¡directories, ¡prine, ¡… ¡

  9. Ques&on ¡ • What ¡(hardware, ¡soZware) ¡do ¡you ¡need ¡to ¡be ¡ able ¡to ¡run ¡an ¡untrustworthy ¡applica&on? ¡

  10. Ques&on ¡ • How ¡should ¡an ¡opera&ng ¡system ¡allocate ¡ processing ¡&me ¡between ¡compe&ng ¡uses? ¡ – Give ¡the ¡CPU ¡to ¡the ¡first ¡to ¡arrive? ¡ – To ¡the ¡one ¡that ¡needs ¡the ¡least ¡resources ¡to ¡ complete? ¡ ¡ ¡To ¡the ¡one ¡that ¡needs ¡the ¡most ¡ resources? ¡

  11. Example: ¡web ¡service ¡ (1) (2) HTTP GET index.html Read file: index.html Client Server index.html (4) (3) HTTP web page File data • How ¡does ¡the ¡server ¡manage ¡many ¡simultaneous ¡ client ¡requests? ¡ • How ¡do ¡we ¡keep ¡the ¡client ¡safe ¡from ¡spyware ¡ embedded ¡in ¡scripts ¡on ¡a ¡web ¡site? ¡ • How ¡do ¡make ¡updates ¡to ¡the ¡web ¡site ¡so ¡that ¡clients ¡ always ¡see ¡a ¡consistent ¡view? ¡

  12. OS ¡Challenges ¡ • Reliability ¡ – Does ¡the ¡system ¡do ¡what ¡it ¡was ¡designed ¡to ¡do? ¡ • Availability ¡ – What ¡por&on ¡of ¡the ¡&me ¡is ¡the ¡system ¡working? ¡ – Mean ¡Time ¡To ¡Failure ¡(MTTF), ¡Mean ¡Time ¡to ¡Repair ¡ • Security ¡ – Can ¡the ¡system ¡be ¡compromised ¡by ¡an ¡agacker? ¡ • Privacy ¡ – ¡Data ¡is ¡accessible ¡only ¡to ¡authorized ¡users ¡

  13. OS ¡Challenges ¡ Users User-mode APP APP APP • Portability ¡ System System System Library Library Library – For ¡programs: ¡ Kernel-user Interface Kernel-mode (Abstract virtual machine) • Applica&on ¡programming ¡ File System Virtual Memory interface ¡(API) ¡ • Abstract ¡virtual ¡machine ¡ TCP/IP Networking Scheduling (AVM) ¡ Hardware Abstraction Layer – For ¡the ¡opera&ng ¡system ¡ Hardware-Specific Software and Device Drivers • Hardware ¡abstrac&on ¡ layer ¡ Hardware Processors Address Translation Disk Graphics Processor Network

  14. OS ¡Challenges ¡ • Performance ¡ – Latency/response ¡&me ¡ • How ¡long ¡does ¡an ¡opera&on ¡take ¡to ¡complete? ¡ – Throughput ¡ • How ¡many ¡opera&ons ¡can ¡be ¡done ¡per ¡unit ¡of ¡&me? ¡ – Overhead ¡ • How ¡much ¡extra ¡work ¡is ¡done ¡by ¡the ¡OS? ¡ – Fairness ¡ • How ¡equal ¡is ¡the ¡performance ¡received ¡by ¡different ¡users? ¡ – Predictability ¡ • How ¡consistent ¡is ¡the ¡performance ¡over ¡&me? ¡

  15. OS ¡History ¡ Multics MVS MS/DOS VMS VM/370 UNIX Windows BSD UNIX Mach Windows NT VMWare Linux NEXT MacOS Windows 8 MacOS X Influence Android iOS Descendant

  16. Computer ¡Performance ¡Over ¡Time ¡ Factor 1981 1997 2014 (2014/1981) Uniprocessor speed (MIPS) 1 200 2500 2.5K 1 1 10+ 10+ CPUs per computer $100K $25 $0.20 500K Processor MIPS/$ 0.002 2 1K 500K DRAM Capacity (MiB)/$ 0.003 7 25K 10M Disk Capacity (GiB)/$ 300 bps 256 Kbps 20 Mbps 100K Home Internet 10 Mbps 100 Mbps 10 Gbps 1000 Machine room network (shared) (switched) (switched) Ratio of users 100:1 1:1 1:several 100+ to computers

  17. Early ¡Opera&ng ¡Systems: ¡ Computers ¡Very ¡Expensive ¡ • One ¡applica&on ¡at ¡a ¡&me ¡ – Had ¡complete ¡control ¡of ¡hardware ¡ – OS ¡was ¡run&me ¡library ¡ – Users ¡would ¡stand ¡in ¡line ¡to ¡use ¡the ¡computer ¡ • Batch ¡systems ¡ – Keep ¡CPU ¡busy ¡by ¡having ¡a ¡queue ¡of ¡jobs ¡ – OS ¡would ¡load ¡next ¡job ¡while ¡current ¡one ¡runs ¡ – Users ¡would ¡submit ¡jobs, ¡and ¡wait, ¡and ¡wait, ¡and ¡ ¡

  18. Time-­‑Sharing ¡Opera&ng ¡Systems: ¡ Computers ¡and ¡People ¡Expensive ¡ • Mul&ple ¡users ¡on ¡computer ¡at ¡same ¡&me ¡ – Mul&programming: ¡run ¡mul&ple ¡programs ¡at ¡ same ¡&me ¡ – Interac&ve ¡performance: ¡try ¡to ¡complete ¡ everyone’s ¡tasks ¡quickly ¡ – As ¡computers ¡became ¡cheaper, ¡more ¡important ¡ to ¡op&mize ¡for ¡user ¡&me, ¡not ¡computer ¡&me ¡

  19. Today’s ¡Opera&ng ¡Systems: ¡ Computers ¡Cheap ¡ • Smartphones ¡ • Embedded ¡systems ¡ • Laptops ¡ • Tablets ¡ • Virtual ¡machines ¡ • Data ¡center ¡servers ¡

  20. Tomorrow’s ¡Opera&ng ¡Systems ¡ • Giant-­‑scale ¡data ¡centers ¡ • Increasing ¡numbers ¡of ¡processors ¡per ¡ computer ¡ • Increasing ¡numbers ¡of ¡computers ¡per ¡user ¡ • Very ¡large ¡scale ¡storage ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend