1 / 66

Advanced Operating Systems

Advanced Operating Systems. Lecture 1: Introduction. University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani. Goal. Introducing the course and policies Some reviews from OS References:

Download Presentation

Advanced Operating Systems

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. Advanced Operating Systems Lecture 1: Introduction University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Advanced Operating Systems

  2. Goal • Introducing the course and policies • Some reviews from OS • References: • Review any undergraduate level OS book. We suggest Silbershutz , Galvin, .. Book • Read “ On building Systems that will fail” by Fernando J. CorBato Advanced Operating Systems

  3. Outline • Agenda • Policy, Grading, reading materials, etc. • Some review from OS • Overview of course materials • Some deep question in OS • Some general guides (Taken mostly from Dr. Shenoy, Univ. of Massachusetts Amherst, website) Advanced Operating Systems

  4. Agenda • To well understand OS architecture and design. • To establish a base for future Operating System research and development. • To discuss latest developments in OS computer via class lectures and assigned readings. • To find the current research issues in the field. • Finally, prepare to perform some projects in OS which are essential in national development and grows. Advanced Operating Systems

  5. Course Materials • Course Web page • visit regularly Htt://cec.ut.ac.ir/classpages/advanceOS • Research papers • On pdf/ps format on the Website • Combination of classic and recent work. • Textbooks: It is mostly paper based but the following book is good for some parts • “Distributed Systems” , Andrew Tanenbaum. • Other good books • “Modern Operating Systems” , Andrew Tanenbaum. • Coulouris, et al., “Distributed Systems: Concepts and Design”, 2nd ed., 004.36 C85d2 • Linux Kernel Development (2.6 kernel) Advanced Operating Systems

  6. Grading • Homework assignments, around %30 • Presentations • Paper presentation, each paper around 1 hour. (For PhD student only) • Final project presentation, around 20 minutes. • Paper reviews. • Homework • Mostly kernel simulation and programming. • Late penalties! • Project around %30 • Exam, final around %40. Advanced Operating Systems

  7. Policy • The course is research oriented. Then, the main focus will be on paper reading and projects. • We will focus more on essential OS concepts and problems and especially on Distributed Systems. • There will be reading and work. Then, be prepared!. • Fast pace and Hard material Advanced Operating Systems

  8. Prerequisites • We assume Programming experience in C • Some familiarity with Unix and system calls • Undergraduate Operating system course • An undergraduate “textbook” OS class • Familiar with concepts like Virtual Memory, processes, etc. • But maybe never seen a real implementation, or written code to do things like manipulate page tables Advanced Operating Systems

  9. Why Study OS? • Operating systems are a maturing field • High-performance servers are an OS issue • Face many of the same issues as OSes • Resource consumption is an OS issue • Battery life, radio spectrum, etc. • Security is an OS issue • Hard to achieve security without a solid foundation • ² New smart devices need new Oses • Today, everything is embedded systems and OS an essential part of it. • Weneedgood knowledge on OS inside the country. Advanced Operating Systems

  10. Operating System? Software that turns silicon into something useful: • Provides abstractions for applications • Manages and hides details of hardware • Accesses hardware through low/level interfaces unavailable to applications. • Provides isolation/protection • Prevents one process/user from clobbering another Advanced Operating Systems

  11. Operating System? • It is an extended machine • Hides the messy details which must be performed • Presents user with a virtual machine, easier to use • It is a resource manager • Each program gets time with the resource • Each program gets space on the resource Real life example: • Government Advanced Operating Systems

  12. Resources Allocation Protection Reclamation Virtualization Services Abstraction Simplification Convenience Standardization What Is an OS? Makes computers simpler Advanced Operating Systems

  13. Resources Allocation Protection Reclamation Virtualization Finite resources Competing demands Examples: CPU Memory Disk Network What Is an OS? Government Limited budget,Land,Oil,Gas, Linux or Windows? Democrat or Republic? Advanced Operating Systems

  14. Resources Allocation Protection Reclamation Virtualization You can’t hurt me I can’t hurt you Implies some degree of safety & security What Is an OS? Government Law and order Advanced Operating Systems

  15. Resources Allocation Protection Reclamation Virtualization The OS gives The OS takes away Voluntary at run time Implied at termination Involuntary Cooperative What Is an OS? Government Income Tax Advanced Operating Systems

  16. Resources Allocation Protection Reclamation Virtualization illusion of infinite, private resources Memory versus disk Timeshared CPU More extreme cases possible (& exist) What Is an OS? Government Social security Advanced Operating Systems

  17. A computer system Advanced Operating Systems

  18. History of OS (1) • First generation 1945 – 1955 • vacuum tubes, plug boards (no OS) • Second generation 1955 – 1965 • transistors, batch systems, IBM 360 • Third generation 1965 – 1980 • ICs and multiprogramming • Fourth generation 1980 – present • personal computers, hand-held devices, sensors • Software has profound though slower impact on computer architecture • Modern architects cannot avoid paying attention to software and compilation issues Advanced Operating Systems

  19. History of OS (1945-55) Early batch system • bring cards to 1401 • read cards to tape • put tape on 7094 which does computing • put tape on 1401 which prints output Advanced Operating Systems

  20. History of OS (1955-65) • Structure of a typical JCL job – 2nd generation • Single user • Programmer/User as the operator • Secure, but inefficient use of expensive resources • Low CPU utilization-slow mechanical I/O devices Advanced Operating Systems

  21. History of Operating Systems (1965-80) • Multiprogramming system • Three jobs in memory – 3rd generation • Spooling - use disk as a very large buffer for input/output devices • Polling/Interrupts, Timesharing Advanced Operating Systems

  22. History of OS: Change! Advanced Operating Systems

  23. The OS Zoo (1980-present) • Mainframe operating systems • Server operating systems • Multiprocessor operating systems • Personal computer operating systems • Real-time operating systems • Embedded operating systems • Smart card operating systems Advanced Operating Systems

  24. Computer Hardware Review (1) • Components of a simple personal computer Monitor Bus Advanced Operating Systems

  25. Computer Hardware Review (2) (a) A three-stage pipeline (b) A superscalar CPU Advanced Operating Systems

  26. Computer Hardware Review (3) • Typical memory hierarchy • numbers shown are rough approximations Advanced Operating Systems

  27. Computer Hardware Review (4) Structure of a disk drive Advanced Operating Systems

  28. Computer Hardware Review (5) One base-limit pair and two base-limit pairs Advanced Operating Systems

  29. Computer Hardware Review (6) • Steps in starting an I/O device and getting interrupt • How the CPU is interrupted (a) (b) Advanced Operating Systems

  30. Computer Hardware Review (7) Structure of a large Pentium system Advanced Operating Systems

  31. Operating System Concepts (1) • A process tree • A created two child processes, B and C • B created three child processes, D, E, and F Advanced Operating Systems

  32. Processor (CPU) Management • Goals • Time sharing • Multiple CPU allocations • Issues • Do not waste CPU resources • Synchronization and mutual exclusion • Fairness • deadlock free Analogy: Video Games Advanced Operating Systems

  33. OS Concepts (2) (a) A potential deadlock. (b) an actual deadlock. Advanced Operating Systems

  34. Operating System Concepts (3) File system for a university department Advanced Operating Systems

  35. Operating System Concepts (4) • Before mounting, • files on floppy are inaccessible • After mounting floppy on b, • files on floppy are part of file hierarchy Advanced Operating Systems

  36. Process Process Pipe A B Operating System Concepts (5) Two processes connected by a pipe Advanced Operating Systems

  37. Making a System Call There are 11 steps in making the system call read (fd, buffer, nbytes) Advanced Operating Systems

  38. System Calls (1) • A stripped down shell: while (TRUE) { /* repeat forever */ type_prompt( ); /* display prompt */ read_command (command, parameters) /* input from terminal */ if (fork() != 0) { /* fork off child process */ /* Parent code */ waitpid( -1, &status, 0); /* wait for child to exit */ } else { /* Child code */ execve (command, parameters, 0); /* execute command */ } } Advanced Operating Systems

  39. System Calls (2) • Processes have three segments: text, data, stack Advanced Operating Systems

  40. System Calls (3) (a) Two directories before linking/usr/jim/memo to ast's directory (b) The same directories after linking Advanced Operating Systems

  41. System Calls (4) (a) File system before the mount (b) File system after the mount Advanced Operating Systems

  42. Operating System Structure (1) Simple structuring model for a monolithic system Advanced Operating Systems

  43. Operating System Structure (2) Structure of the THE operating system Advanced Operating Systems

  44. Operating System Structure (3) Structure of VM/370 with CMS CMS- Conversational Monitor System Advanced Operating Systems

  45. Operating System Structure (4) The client-server model Advanced Operating Systems

  46. Operating System Structure (5) The client-server model in a distributed system Advanced Operating Systems

  47. Scheduling: polling vs. interrupts • Maintain peak performance under heavy load • Interrupts model can lead to livelock • Solution: • Use interrupts under low load (good latency) • Use polling under heavy load (good throughput) • Polling is typically more efficient than interrupts • Fits naturally into asynchronous I/O model Advanced Operating Systems

  48. Another Look: Unix “Onion” Applications User and Kernel boundary OS Service Device Driver Hardware Advanced Operating Systems

  49. Other design issues • Disk scheduling • Elevator algorithm • Memory management • File system buffer cache • Address spaces (VM management) • Fault isolate different servers • Efficient local communication? • Efficient transfers between disk and networks • Avoid copies Advanced Operating Systems

  50. More than one processor • Problem: single machine may not scale to enough clients • Solutions: • Multiprocessors • Helps when CPU is bottleneck • Server clusters • Helps when bandwidth between server and backbone is high • Distributed server clusters • Helps when bandwidth between client and distant server is low Advanced Operating Systems

More Related