/
Introduction to Operating Systems Introduction to Operating Systems

Introduction to Operating Systems - PowerPoint Presentation

roberts
roberts . @roberts
Follow
66 views
Uploaded On 2023-07-22

Introduction to Operating Systems - PPT Presentation

CPSCECE 3220 Spring 2023 Lecture Notes OSPP Chapter 1 adapted by Mark Smotherman from Tom Andersons slides on OSPP web site Chapter 1 Operating system definition Software to manage a computers resources for its users and applications ID: 1010587

time users operating system users time system operating resources application user storage computers memory web virtual applications concurrency complete

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Introduction to Operating Systems" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1. Introduction to Operating SystemsCPSC/ECE 3220 Spring 2023Lecture NotesOSPP Chapter 1(adapted by Mark Smotherman from Tom Anderson’s slides on OSPP web site)

2. Chapter 1Operating system definitionSoftware to manage a computer’s resources for its users and applicationsOS rolesReferee, illusionist, and glueCore ideasProtection, concurrency, resource allocation, virtualization, reliable storage

3. What is an operating system?Software to manage a computer’s resources for its users and applications

4. Operating System RolesReferee (“more constrained”)Resource allocation among users and applicationsIsolation of users and applications from each otherCommunication between users and applicationsIllusionist (“more powerful”)Each application appears to have a machine to itselfPhysical limitations and details are maskedHigher-level objects are provided, such as filesGlue (“more useful”)Execution environment with common set of servicesFiles written by one app can be read by another

5. Example: File SystemsRefereePrevent users from accessing each other’s files without permissionIllusionistFiles and directoriesFiles can grow (nearly) arbitrarily largeCharacter or block I/O whether disk or networkDisk details such as sector size are hiddenGlueopen(), fprintf(), fscanf()

6. Protection – Chapter 2The isolation of potentially misbehaving applications and users so that they do not corrupt other applications or the OS itselfPrevent corruption of memory and filesPrevent denial of service (DoS) to other users by unstoppable infinite loop on CPUPrevent crash of one application causing whole system to crash

7. Key Ideas for ProtectionHardware supportTwo execution modes: Kernel and UserMemory protectionA user process is a separate protection domainUser processes run in user mode and can only access their own subset of memory locationsThe instructions to change memory protection are valid only in kernel mode, which is reserved for the OSProtects other users as well as the OS

8. System Call Interface – Chapter 3Process managementInterprocess communicationOS structureOne monolithic program (early designs)Layered approach (more recent designs)

9. Concurrency – Chapters 4-6Multiple activities that can happen at the same timeReal concurrency: multiple CPUsApparent concurrency: time sharing on single CPUMultiple threads executing within the context of a processShared memorySynchronization approaches for atomic updates

10. Resource Allocation – Chapters 6-7Resource: a physical or virtual entity that can be assigned to a user or applicationE.g., OS decides how much CPU time and when, how much memory and whenOS may limit allocations for purposes of efficiency and fairnessOS controls the sharing of resources

11. Virtualization – Chapters 8-10Provide an application with the illusion of resources that are not physically presentMay be within a physical machine, such as virtual memory, or may be a full virtual machine

12. Reliable Storage – Chapters 11-14Safely store user data even if the system crashes due to software errors or hardware failuresUpdate multiple blocks of storage in a single transaction, which can be restarted on failureFor example:Write a list of intended changes to a log fileWrite a commit record to indicate end of listMake the changes to the storage blocksReclaim the space in log

13. QuestionHow should an operating system allocate processing time between competing 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?Design choices represent trade-offs

14. Example: Web ServiceHow 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?

15. OS ChallengesReliabilityDoes the system do what it was designed to do?AvailabilityWhat portion of the time is the system working?Mean Time To Failure (MTTF), Mean Time to Repair (MTTR)Availability = MTTF / (MTTF + MTTR)SecurityCan the system be compromised by an attacker?Privacy Data is accessible only to authorized users

16. OS ChallengesPortabilityFor programs:Application programming interface (API)Abstract virtual machine (AVM)For the operating systemHardware abstraction layer

17. OS ChallengesPerformanceLatency/response timeHow long does an operation take to complete?ThroughputHow many operations can be done per unit of time?OverheadHow much extra work is done by the OS?FairnessHow equal is the performance received by different users?PredictabilityHow consistent is the performance over time?

18. Abbreviated OS History

19. Selected OS Developers1960sFred Brooks (manager) – IBM OS/360Fernando Corbató (project leader) – Multics1970sDave Cutler – DEC VMS (and later Windows NT)Dennis Ritchie and Ken Thompson – UNIX1980sRick Rashid – Mach1990sLinus Torvalds – Linux

20. Computer Performance Over Time

21. Early Operating Systems:Computers Were Very ExpensiveOne application at a timeHad complete control of hardwareRuntime library was a primitive OSUsers would stand in line to use the computerBatch systemsKeep CPU busy by having a queue of jobsOS would load next job while current one runsUsers would submit jobs and wait

22. Time-Sharing Operating Systems:Computers and People Both ExpensiveMultiple users on computer at same timeMultiprogramming: run multiple programs at same timeInteractive performance: try to complete everyone’s tasks quicklyAs computers became cheaper, more important to optimize for user time, not computer time

23. Today’s Operating Systems:Computers Are CheapSmartphonesEmbedded systemsLaptopsTabletsVirtual machinesData center servers

24. Tomorrow’s Operating SystemsWarehouse-scale data centersIncreasing numbers of processors per computerIncreasing numbers of computers per userVery large scale storage