Operating Systems Lecture 1 What is an Operating System? January 28, 2013 Engr. Fawad Riasat Raja
Who am I?
Engr. Fawad Riasat RajaAssistant Professor• SED, UET Taxila• Office hours: By Appointment
• Background:– MSc Computer Engineering
• Research areas:– Current: Cloud Computing, Peer-to-Peer Networks,
Green Computing….
Course Administration
• Instructor: Fawad Riasat Raja (Assistant Professor, SED)UET Taxila
• Lab Instructor: Engr. Saima (Alpha Group) Engr. Ambreen (Omega Group)
• Labs: First Floor of SED (DOT-IT Lab)
• Website: TBA
• Course Email: [email protected]
Textbook
• Text: Operating Systems Concepts, 8th Edition Silbershatz, Galvin, Gagne
• Online supplements– See “Tutorial” link on course website
• Question: need 8th edition? – No, but has new material that we may cover– Completely reorganized– Will try to give readings from both the 6th and 7th
editions on the lecture page
Reference Books
• Operating Systems(William Stallings)
• Operating Systems Design and Implementations,(Andrew S. Tanenbaum)
Grading
• Rough Grade Breakdown– Quizzes 10%Assignments 10%MID Semester Exam 20%Lab Reports 20%End Semester Exam 40%
Class Schedule
• Class Time: Monday (Alpha Group) (08:40 AM to 11:10 AM)Thursday (Omega Group) (11:10 AM to 12:50 PM, 01:40 PM to 2:30PM)
• Venue: Class Room No. SECR-03
Note: Please come to class. Lecture notes do not have everythingin them. The best part of class is the interaction!
Typical Lecture Format
• 45-Minute Lecture• 5- Break• 45-Minute Lecture• 5-Minute Break (water, stretch)• 45-Minute Lecture• Instructor will come to class early & stay after to answer
questions
Attention
Time
45 min. Break “In Conclusion, ...”45 min. Break 45 min.
Rules and Regulations
• Attendance requirements must be fulfilled. No relaxation in this regard will be given under any conditions.
• Late Assignments will not be entertained.• Do not approach the instructor for any delay in
Assignments/Quizzes.• There will be unannounced quizzes. • Switched off your cell phone during lecture. Use
of cell phone during the lecture is strictly prohibited.
• Discipline should be maintained during the lecture. Anyone found guilty of creating nuisances will be expelled from the class.
Goals for Today
• Course Structure• What is an Operating System?
– And – what is it not?• Examples of Operating Systems design• Why study Operating Systems?• Oh, and “How does this class operate?”
Interactive is important!Ask Questions!
Note: Note: Lecture slides and/or pictures are adapted from slides ©2005 Silberschatz by Galvin and Gagne, ©VU by Dr. Mansoor and ©University of California Berkeley by Kubi and Stoica.
Goals for Today
• Single-user systems• Batch systems• Multiprogrammed systems• Time-sharing systems• Real-time systems • Interrupts, traps, and signals• CPU, I/O, and memory protection
Course
• Operating System Structure• Types of OS • Processes• Inter-Process Communication• Process Scheduling • Threads• Deadlocks• Memory• File System• Disk Scheduling
Computer System Organization
• Computer-system operation– One or more CPUs, device controllers connect through common bus providing access to shared memory
– Concurrent execution of CPUs and devices competing for memory cycles
What does an Operating System do?• Silerschatz and Gavin:
“An OS is Similar to a government”– Begs the question: does a government do anything useful by
itself?• Coordinator and Traffic Cop:
– Manages all resources– Settles conflicting requests for resources– Prevent errors and improper use of the computer
• Facilitator:– Provides facilities that everyone needs– Standard Libraries, Windowing systems– Make application programming easier, faster, less error-prone
• Some features reflect both tasks:– E.g. File system is needed by everyone (Facilitator)– But File system must be Protected (Traffic Cop)
What is an Operating System,… Really?
• Most Likely:– Memory Management– I/O Management– CPU Scheduling– Communications? (Does Email belong in OS?)– Multitasking/multiprogramming?
• What about?– File System?– Multimedia Support?– User Interface?– Internet Browser? ☺
• Is this only interesting to Academics??
Operating System Definition (Cont.)
• No universally accepted definition• “Everything a vendor ships when you order an
operating system” is good approximation– But varies wildly
• “The one program running at all times on the computer” is the kernel.
– Everything else is either a system program (ships with the operating system) or an application program
More complex OS: Multiple Apps
• Full Coordination and Protection– Manage interactions between different users– Multiple programs running simultaneously– Multiplex and protect Hardware Resources
» CPU, Memory, I/O devices like disks, printers, etc• Facilitator
– Still provides Standard libraries, facilities
• Would this complexity make sense if there were only one application that you cared about?
Example: Protecting Processes from Each Other
• Problem: Run multiple applications in such a way that they are protected from one another
• Goal: – Keep User Programs from Crashing OS– Keep User Programs from Crashing each other– [Keep Parts of OS from crashing other parts?]
• (Some of the required) Mechanisms:– Address Translation– Dual Mode Operation
• Simple Policy:– Programs are not allowed to read/write memory of other Programs or of Operating System
OS Components
• Process management• Main memory management• Secondary storage management• I/O system management• File management• Protection system• Networking• Command-line interpreter (shells)
Operating System Services
Services for user and users of programs:• Program execution• I/O Operations• File System Manipulation• Communications between processes/users • Error detection and handling
Operating System Services …
Services for efficient system operation:• Resource management• Accounting• Protection
“In conclusion…”
• Operating systems provide a virtual machine abstraction to handle diverse hardware
• Operating systems coordinate resources and protect users from each other
• Operating systems simplify application development by providing standard services
• Operating systems can provide an array of fault containment, fault tolerance, and fault recovery