Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 153 Design of Operating Systems Winter 2015 Lecture 1: Course Introduction Guest lecturer: Prof. Tom Payne Instructor: Nael Abu-Ghazaleh Slides modified.

Similar presentations


Presentation on theme: "CSE 153 Design of Operating Systems Winter 2015 Lecture 1: Course Introduction Guest lecturer: Prof. Tom Payne Instructor: Nael Abu-Ghazaleh Slides modified."— Presentation transcript:

1 CSE 153 Design of Operating Systems Winter 2015 Lecture 1: Course Introduction Guest lecturer: Prof. Tom Payne Instructor: Nael Abu-Ghazaleh Slides modified from Harsha Madhyvasta

2 CSE 153 – Lecture 12 Class Overview l Monitor class webpage for information u http://www.cs.ucr.edu/~nael/cs153/ http://www.cs.ucr.edu/~nael/cs153/ u Will send out link to webpage l Lecture slides, homeworks, and projects will be posted on class webpage l Assignment turn-in through iLearn l Announcements through iLearn and posted on class webpage l Piazza for discussion forums; emails to be sent out soon

3 CSE 153 – Lecture 13 Textbooks l Anderson and Dahlin, Operating Systems: Principles and Practice (required) l Arpaci-Dusseau and Arpaci-Dusseau, Operating Systems: Three Easy Pieces (recommended) u Free (and very good!) book available at: »http://pages.cs.wisc.edu/~remzi/OSTEP/ l Silberschatz, Galvin, and Gagne, Operating System Concepts, John Wiley and Sons, 8th Edition

4 CSE 153 – Lecture 14 Class Overview l Grading breakdown u 3 projects (15% each) u 3 homeworks (5% each) u Mid-term (20%) u Final (20%) u Extra credit (2%) l Collaboration policy u Feel free to discuss with other students in class u But, every student should write solutions to homeworks independently and every project group should write code independently

5 CSE 153 – Lecture 15 Projects l Project framework this time: Pintos u Projects are in C u Very good debugging support u Test cases come with the default code base u Used in OS class at several other universities l You have first two weeks of the quarter to get familiar u Make sure to attend the first lab u Go over the Pintos documentation (on the course web page)

6 Projects are HARD! l Probably the hardest class you will take at UCR in terms of development effort l Working on the projects will take most of your time in this class l Biggest reason the projects are hard: legacy code u You have to understand existing code before you can add more code u Preparation for main challenge you will face at any real job CSE 153 – Lecture 16

7 Project recommendations l Do not start working on projects at last minute! u You are graded for how well your code works, not for how many hours you have put in or how many lines of code you wrote u Debugging is integral process of development l Make good use of help available u Post questions on piazza u Take advantage of TA office hours u Labs CSE 153 – Lecture 17

8 Project logistics l Three projects to be done in groups of two u When you have chosen groups, send your group info to the TA for your lab »Joshua Frear »Anthony Williams u Send email if unable to find partner and we’ll form groups u Option to switch partners after project one l For every project, design document due a week before the project is due (5 points out of 15 points for project) u Walkthrough questions u Incentive to think through early what you need to do CSE 153 – Lecture 18

9 9 Homeworks and Exams l Three homeworks u Can expect similar questions in the exams l Midterm (early Feb.) u Covers first half of class l Final u Covers second half of class + selected material from first part »I will be explicit about the material covered l No makeup exams u Unless dire circumstances

10 Schedule is on class webpage: http://www.cs.ucr.ued/~nael/cs15310

11 Submission Policies l Homeworks due in class on day of submission l Code and design documents for projects due before class on day of submission l Late policy: u 4 slack days across all three projects u 5 point penalty for every late day beyond that CSE 153 – Lecture 111

12 Recipe for success in CS153 l Start early on projects l Attend labs and office hours u Take advantage of available help l Make sure to attend lectures u Going over slides is not the same l Read textbook material before class l Ask questions when something is unclear u 4% participation and extra credit – may bump up your grade if on borderline CSE 153 – Lecture 112

13 CSE 153 – Lecture 113 Objectives of this class l In this course, we will study problems and solutions that go into design of an OS to address these issues u Focus on concepts rather than particular OS u Specific OS for examples l Develop an understanding of how OS and hardware impacts application performance and reliability l Examples: u What causes your code to crash when you access NULL? u Why can multi-threaded code be slower than single-threaded code?

14 Questions for today l Why do we need operating systems course? l Why do we need operating systems? l What does an operating system need to do? l How did we arrive at current designs? CSE 153 – Lecture 114

15 CSE 153 – Lecture 115 Why an OS class? l Why are we making you sit here today, having to suffer through a course in operating systems? u After all, most of you will not become OS developers l Understand what you use u Understanding how an OS works helps you develop apps u System functionality, performance, security, efficiency, etc. l Pervasive abstractions u Concurrency: Threads and synchronization are common modern programming abstractions (Java,.NET, etc.) l Complex software systems u Many of you will go on to work on large software projects u OSes serve as examples of an evolution of complex systems

16 Questions for today l Why do we need operating systems course? l Why do we need operating systems? l What does an operating system need to do? l How did we arrive at current designs? CSE 153 – Lecture 116

17 l What if applications ran directly on hardware? l Problems: u Portability u Resource sharing Why have an OS? CSE 153 – Lecture 117 Applications Hardware

18 l The operating system is the software layer between user applications and the hardware l The OS is “all the code that you didn’t have to write” to implement your application CSE 153 – Lecture 118 What is an OS? Operating System Hardware Applications

19 Questions for today l Why do we need operating systems course? l Why do we need operating systems? l What does an operating system need to do? l How did we arrive at current designs? CSE 153 – Lecture 119

20 Roles an OS plays CSE 153 – Lecture 120

21 CSE 153 – Lecture 121 More technically : OS and Hardware l The OS virtualizes/controls/mediates access to hardware resources u Computation (CPUs) u Volatile storage (memory) and persistent storage (disk, etc.) u Communication (network, modem, etc.) u Input/output devices (keyboard, display, printer, camera, etc.) l The OS defines a set of logical resources (objects) and a set of well-defined operations on those objects (interfaces) u Physical resources (CPU and memory) u Logical resources (files, programs, names) u Sounds like OO…

22 CSE 153 – Lecture 122 The OS and Applications l The OS defines a logical, well-defined environment… u Virtual machine (each program thinks it owns the computer) l …for users and programs to safely coexist, cooperate, share resources l Benefits to applications u Simpler (no tweaking device registers) u Device independent (all network cards look the same) u Portable (across Windows95/98/ME/NT/2000/XP/Vista/…)

23 CSE 153 – Lecture 123 Fundamental OS Issues l The fundamental issues/questions in this course are: u Structure: how is an operating system organized? u Sharing: how are resources shared among users? u Naming: how are resources named (by users and programs)? u Protection: how are users/programs protected from each other? u Security: how can information access/flow be restricted? u Communication: how to exchange data? u Reliability and fault tolerance: how to mask failures? u Extensibility: how to add new features?

24 Other Questions to Ponder l What is part of an OS? What is not? u Is the windowing system part of an OS? Java? l Popular OSes today are Windows, Linux, and OS X u How different/similar do you think these OSes are? l Somewhat surprisingly, OSes change all of the time u Consider the series of releases of Windows, Linux, OS X… u What are the drivers of OS change? u What are the most compelling issues facing OSes today? CSE 153 – Lecture 124

25 Pondering Cont’d l How many lines of code in an OS? u Vista (2006): 50M (XP + 10M) »What is largest kernel component? u OS X (2006): 86M u Debian 3.1 (2006): 213M l What does this mean (for you)? u OSes are useful for learning about software complexity u OS kernel is only one component, however »Linux 3.6: 15M »KDE (X11): 4M »Browser : 2M+ u OS is just one example of many complex software systems »If you become a developer, you will face complexity CSE 153 – Lecture 125

26 Questions for today l Why do we need operating systems course? l Why do we need operating systems? l What does an operating system need to do? l How did we arrive at current designs? CSE 153 – Lecture 126

27 CSE 153 – Lecture 127 Brief History of OS design In the beginning… l OSes were runtime libraries u The OS was just code you linked with your program and loaded into the computer u First computer interface was switches and lights, then punched tape and cards l Batch systems were next u OS was permanently stored in primary memory u It loaded a single job (card reader, mag tape) into memory u Executed job, created output (line printer) u Loaded the next job, repeat… u Card readers, line printers were slow, and CPU was idle while they were being used

28 CSE 153 – Lecture 128 Spooling l Disks provided a much faster I/O device than card readers, mag tape, and line printers l Motivated development of spooling (Simultaneous Peripheral Operation On-Line) u Use disk to overlap I/O of one job with computation of others u Move program/data from card reader onto disk while another job computes u When done, next job ready to be loaded from disk u Can spool multiple programs onto disk, OS can choose which job to run next (job scheduling) u But, CPU still idle when job reads/writes to disk

29 CSE 153 – Lecture 129 Multiprogramming l Multiprogramming increased system utilization u Keeps multiple runnable jobs loaded in memory u Overlaps I/O processing of a job with computation of another u Benefits from I/O devices that can operate asynchronously u Requires the use of interrupts and DMA u Requires memory protection and sharing u Optimizes system throughput (number of jobs finished in a given amount of time) at the cost of response time (time until a particular job finishes)

30 CSE 153 – Lecture 130 Timesharing l Timesharing supports interactive use of computer by multiple users u Terminals give the illusion that each user has own machine u Optimizes response time (time to respond to an event like a keystroke) at the cost of throughput u Based on timeslicing – dividing CPU time among the users u Enabled new class of applications – interactive! u Users now interact with viewers, editors, debuggers l The MIT Multics system (mid-late 60s) was an early, aggressive timesharing system l Unix and Windows are also timesharing systems…

31 CSE 153 – Lecture 131 Distributed Operating Systems l Distributed systems facilitate use of geographically distributed resources u Machine connected by wires l Supports communication between parts of a job or different jobs on different machines u Interprocess communication l Sharing of distributed resources, hardware, and software u Exploit remote resources l Enables parallelism, but speedup is not the goal u Goal is communication

32 CSE 153 – Lecture 132 Parallel Operating Systems l Support parallel applications trying to get speedup of computationally complex tasks across multiple CPUs l Requires basic primitives for dividing single task into multiple parallel activities l Supports efficient communication among activities l Supports synchronization of activities to coordinate data sharing l Early parallel systems used dedicated networks and custom CPUs, now common to use networks of high- performance PC/workstations

33 CSE 153 – Lecture 133 Embedded Operating Systems l Decreased cost of processing makes computers ubiquitous u Your car has dozens of computers in it u Think of everything that has electric motor in it, and now imagine that it also has a computer l Each embedded application needs its own OS u Cell phones u PDAs (PalmPilot, etc.) l Very soon u Your house will have 100s of embedded computers in it u Your electrical lines and airwaves will serve as the network u All devices will interact as a distributed system

34 For next class… l Browse the course web (especially Pintos docs) http://www.cs.ucr.edu/~nael/cs153 l Read chapters 1 and 2 in textbook l Start … u … tinkering with Pintos u … finding a partner for project group CSE 153 – Lecture 134

35 CSE 153 – Lecture 135 Blank

36 CSE 153 – Lecture 136 How Not To Pass CSE 153 l Do not come to lecture u It’s nice out, the slides are online, and the material is in the book anyway u Lecture material is the basis for exams and directly relates to the projects l Do not ask questions in lecture, office hours, or email u It’s scary, I don’t want to embarrass myself u Asking questions is the best way to clarify lecture material at the time it is being presented u Office hours and email will help with projects

37 CSE 153 – Lecture 137 How Not To Pass (2) l Wait until the last couple of days to start a project u We’ll have to do the crunch anyways, why do it early? u The projects cannot be done in the last few days u Repeat: The projects cannot be done in the last few days u Each quarter groups learn that starting early meant finishing all of the projects on time…and some do not

38 CSE 153 – Lecture 138 Wrap-up Preliminaries l Surefire steps to do poorly in CS 153 u DON’T come to lecture u DON’T ask questions in class when unclear u DON’T start projects well in advance u DON’T come to office hours l Before we start the material, any questions about the class structure, contents, etc.?


Download ppt "CSE 153 Design of Operating Systems Winter 2015 Lecture 1: Course Introduction Guest lecturer: Prof. Tom Payne Instructor: Nael Abu-Ghazaleh Slides modified."

Similar presentations


Ads by Google