1 / 37

Introduction

Introduction. 1. Why Study Operating Systems?. Understand the model of operation Easier to see how to use the system Enables you to write efficient code Learn to design an OS Even so, OS is pure overhead of real work

leigh
Download Presentation

Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Operating Systems: A Modern Perspective, Chapter 1

  2. Introduction 1 Operating Systems: A Modern Perspective, Chapter 1

  3. Why Study Operating Systems? • Understand the model of operation • Easier to see how to use the system • Enables you to write efficient code • Learn to design an OS • Even so, OS is pure overhead of real work • Application programs have the real value to person who buys the computer Operating Systems: A Modern Perspective, Chapter 1

  4. Perspectives of the Computer print open() start-printer cut malloc() read-disk send fork() save track-mouse Application Software Application Software Application Software System Software System Software System Software Hardware Hardware Hardware (c) OS Programmer View • End User • View (b) Application Programmer View Operating Systems: A Modern Perspective, Chapter 1

  5. System Software • Independent of individual applications, but common to all of them • Examples • C library functions • A window system • A database management system • Resource management functions • The OS Operating Systems: A Modern Perspective, Chapter 1

  6. Using the System Software Application Programmer Software API Command Line Interpreter Loader Window System Libraries Libraries Libraries Compiler System Software OS Database Management System Hardware Operating Systems: A Modern Perspective, Chapter 1

  7. Application Software, System Software, and the OS Human-Computer Interface Application Software API System Software (More Abstract Resources) OS Interface Trusted OS (Abstract Resources) Software-Hardware Interface Hardware Resources Operating Systems: A Modern Perspective, Chapter 1

  8. The OS as Resource Manager • Process: An executing program • Resource: Anything that is needed for a process to run • Memory • Space on a disk • The CPU • “An OS creates resource abstractions” • “An OS manages resource sharing” Operating Systems: A Modern Perspective, Chapter 1

  9. write(char *block, int len, int device, int track, int sector) { ... load(block, length, device); seek(device, 236); out(device, 9); ... } write(char *block, int len, int device,int addr); fprintf(fileID, “%d”, datum); Resource Abstraction load(block, length, device); seek(device, 236); out(device, 9) Operating Systems: A Modern Perspective, Chapter 1

  10. Disk Abstractions Application Programmer OS Programmer int fprintf(…) { ... write(…) … } void write() { load(…); seek(…) out(…) } load(…); seek(…); out(…); (c) fprintf() abstraction (a) Direct Control (b) write() abstraction Operating Systems: A Modern Perspective, Chapter 1

  11. Abstract Resources User Interface Application Abstract Resources (API) Middleware OS Resources (OS Interface) OS Hardware Resources Operating Systems: A Modern Perspective, Chapter 1

  12. Abstract Machines Abstract Machines Idea Program Result Physical Machine Idea Program Result … … … Idea Program Result Operating Systems: A Modern Perspective, Chapter 1

  13. Resource Sharing • Space- vs time-multiplexed sharing • To control sharing, must be able to isolate resources • OS usually provides mechanism to isolate, then selectively allows sharing • How to isolate resources • How to be sure that sharing is acceptable • Concurrency Operating Systems: A Modern Perspective, Chapter 1

  14. The OS as a Conductor The OS coordinates the sharing and use of all the components in the computer Operating Systems: A Modern Perspective, Chapter 1

  15. Multiprogramming Abstract Machine Pj Abstract Machine Pi Abstract Machine Pk … OS Resource Sharing Pi Memory Pk Memory … Pj Memory Time-multiplexed Physical Processor Space-multiplexed Physical Memory Operating Systems: A Modern Perspective, Chapter 1

  16. Multiprogramming(2) • Technique for sharing the CPU among runnable processes • Process may be blocked on I/O • Process may be blocked waiting for other resource, including the CPU • While one process is blocked, another might be able to run • Multiprogramming OS accomplishes CPU sharing “automatically” – scheduling • Reduces time to run all processes Operating Systems: A Modern Perspective, Chapter 1

  17. How Multiprogramming Works Process 1 Process 2 Process 3 Time-multiplexed CPU Process 4 Space-multiplexed Memory Operating Systems: A Modern Perspective, Chapter 1

  18. Speeding Up the Car Wash Vacuum Inside Wash Dry (a) The Sequential Car Wash Vacuum Inside Wash Dry (b) The Parallel Car Wash Operating Systems: A Modern Perspective, Chapter 1

  19. Multiprogramming Performance Pi’s Total Execution Time, ti Time 0 ti (a) Pi’s Use of Machine Resources P1 P2 … Pi … PN Time (a) All Processes’ Use of Machine Resources Using the processor I/O operation Operating Systems: A Modern Perspective, Chapter 1

  20. OS Strategies • Batch processing • Timesharing • Personal computer & workstations • Process control & real-time • Network • Distributed • Small computers Operating Systems: A Modern Perspective, Chapter 1

  21. Batch Processing Job 3 Job 19 Input Spooler Output Spooler Output Spool Input Spool Operating Systems: A Modern Perspective, Chapter 1

  22. Batch Processing(2) • Uses multiprogramming • Job (file of OS commands) prepared offline • Batch of jobs given to OS at one time • OS processes jobs one-after-the-other • No human-computer interaction • OS optimizes resource utilization • Batch processing (as an option) still used today Operating Systems: A Modern Perspective, Chapter 1

  23. A Shell Script Batch File cc -g -c menu.c cc -g -o driver driver.c menu.o driver < test_data > test_out lpr -PthePrinter test_out tar cvf driver_test.tar menu.c driver.c test_data test_out uuencode driver_test.tar driver_test.tar >driver_test.encode Operating Systems: A Modern Perspective, Chapter 1

  24. Timesharing Systems Abstract Machines Result Physical Machine Command Result Command … Result Command Operating Systems: A Modern Perspective, Chapter 1

  25. Timesharing Systems(2) • Uses multiprogramming • Support interactive computing model (Illusion of multiple consoles) • Different scheduling & memory allocation strategies than batch • Tends to propagate processes • Considerable attention to resource isolation (security & protection) • Tend to optimize response time Operating Systems: A Modern Perspective, Chapter 1

  26. Personal Computers • CPU sharing among one person’s processes • Power of computing for personal tasks • Graphics • Multimedia • Trend toward very small OS • OS focus on resource abstraction • Rapidly evolved to “personal multitasking” systems Operating Systems: A Modern Perspective, Chapter 1

  27. Process Control & Real-Time • Computer is dedicated to a single purpose • Classic embedded system • Must respond to external stimuli in fixed time • Continuous media popularizing real-time techniques • An area of growing interest Operating Systems: A Modern Perspective, Chapter 1

  28. Networks • LAN (Local Area Network) evolution • 3Mbps (1975)  10 Mbps (1980)  100 Mbps (1990)  1 Gbps (2000) • High speed communication means new way to do computing • Shared files • Shared memory • Shared procedures/objects • ??? Operating Systems: A Modern Perspective, Chapter 1

  29. Distributed OS • Wave of the future App App App App App App Distributed OS Multiple Computers connected by a Network Operating Systems: A Modern Perspective, Chapter 1

  30. Small Computers • PDAs, STBs, embedded systems became commercially significant • Have an OS, but • Not general purpose • Limited hardware resources • Different kinds of devices • Touch screen, no keyboard • Graffiti • Evolving & leading to new class of Oses • PalmOS, Pocket PC (WinCE), VxWorks, … Operating Systems: A Modern Perspective, Chapter 1

  31. Evolution of Modern OS Timesharing Network OS Memory Mgmt PC & Wkstation Client-Server Model Scheduling Batch Protection Protocols System software Real-Time Human-Computer Interface Memory Mgmt Protection Scheduling Scheduling Files Devices Small Computer Network storage, Resource management Modern OS Operating Systems: A Modern Perspective, Chapter 1

  32. Examples of Modern OS • UNIX variants (e.g. Linux) -- have evolved since 1970 • Windows NT/2K -- has evolved since 1989 (much more modern than UNIX • Win2K = WinNT, V5 • Research OSes – still evolving … • Small computer OSes – still evolving … • Book provides Linux examples • This course will use Windows NT as the main example Operating Systems: A Modern Perspective, Chapter 1

  33. The Microsoft OS Family Win32 API Win32 API Subset Win32 API SubSet Windows CE (Pocket PC) Windows 95/98/Me Windows NT/2000/XP Operating Systems: A Modern Perspective, Chapter 1

  34. Microsoft Windows NT • Heavily window-oriented • Foundation behavior is windows-independent • We will focus on the foundation • Use only the “MS-DOS prompt” -- cmd.exe OS API NT User Interface and Graphics NT Executive NT Kernel Operating Systems: A Modern Perspective, Chapter 1

  35. Windows NT (cont) • OS API has text orientation (like UNIX) • Object-oriented implementation • Heavy use of threads • Broad spectrum of synchronization tools • Modern I/O system Operating Systems: A Modern Perspective, Chapter 1

  36. VxWorks Organization Applications VxWorks Runtime System VxWorks Configurable Core OS Extension Wind Microkernel Operating Systems: A Modern Perspective, Chapter 1

  37. Windows CE Organization Operating Systems: A Modern Perspective, Chapter 1

More Related