Operating Systems Spring 2002 William Moran email moran cs nyu edu phone 212 762 2673 email is preferable class Mondays 5 6 50 CIWW 102 office hours Mondays 7 8 30 CIWW 401 Moran OS Lecture 1 1 Goals Understand OS Basics Processes Scheduling Virtual Memory File Systems Device Control Understand How Some Real OSs Do It Mostly Unix Understand some of the new challenges OSs face Moran OS Lecture 1 2 Admin 1 Text is Modern Operating Systems 2ed by Tannenbaum Text will be supplemented by some papers I will provide either paper copies or URLs Grade will be based on 3 programming assignments and a final exam 20 per assignment and 40 for the final Homeworks will be given but these are optional and can only help your grade Office Hours Monday 7 8 30 in 401 By Appointment send email Moran OS Lecture 1 3 Admin 2 Programming Assignments form an important part of the class this is a systems class not a theory class Programming Languages C C Java Sun Accounts send email to csgrad cs nyu edu Class Web Page www cs nyu edu courses spring02 G22 2250 001 index htm Majordomo for class mailing list subscribe g22 2250 001 sp02 Moran OS Lecture 1 4 Important Programming assignments that are not explicitly group exercises should be written by one person Do not hand in a program written by someone else Moran OS Lecture 1 5 Introduction 1 What is an Operating System The software that runs in protected kernel supervisor mode The software that provides an abstraction to the hardware for application programs The software that manages the hardware resources for application programs The software that controls system resources and the processes using these resources Moran OS Lecture 1 6 Introduction 2 Operating Systems hide the complexity of the hardware from programmers disks and controllers networks memory processors Operating Systems manage the resources of the machine device drivers file systems process architecture scheduler Moran OS Lecture 1 7 Cache Memory Processor Registers Bus Cache Bus Controller Disk CDROM Controller Floppy Controller Video Network Card Keyboard Mouse Serial Ports Modern systems are very complex There are many devices there are many kinds of devices including disk types controller types video cards etc If every application had to deal with this complexity few applications would be written Instead the operating system presents an abstraction to the applications Only the OS has to deal with this complexity Moran OS Lecture 1 8 Systems get built in layers one view of the layers is Applications Operating System Hardware System call interface Kernel Device Drivers Machine Language Microprogramming Physical Devices The lowest layers provide services that are used by the higher layers Another view of the layers 1 Scripts 2 Applications and Utilities 3 System software 4 System Libraries 5 System call interface 6 Operating System kernel 7 Hardware Higher Levels of Abstraction Moran OS Lecture 1 9 The Operating System itself is usually layered 1 System Calls 2 File System 3 Process Architecture 4 Machine or Hardware independent I O 5 Device Drivers machine dependent Typically only level 5 has to know anything about the hardware although higher levels sometimes need to for efficiency reasons Higher layers are more abstract and they present a more abstract view of the hardware For example the Write system call presents a very abstract view of the hardware since it looks the same whether it is writing to a disk or the network Moran OS Lecture 1 10 A Little History 1 1 Single User Computers typically few devices and the system software was usually primitive The single user had control of the hardware and when she was done another user would get to use the machine to run his program The owners of the hardware because it was so expensive didn t like this lots of wasted time between jobs 2 Batch one way to save time is to batch user jobs up and run them one after the other This saves the wasted time but it removes the users from direct interaction with the machine which they hated It also makes it apparent how much time is wasted while the machine waits for I O operations to complete 3 Multiprogramming run several jobs at once When one program needs to do I O another can be using the processor This makes better use of the processor but requires memory protection to keep the jobs from interfering with each other Total throughput goes up but the time to complete a given job increases Memory Management Moran OS Lecture 1 11 A Little History 2 4 Timesharing Multiprogramming with rapid switching between tasks Users get to interact with the machine more which they like but this requires better scheduling of the processes Total throughput goes down as more resources are used switching between tasks Process Scheduling 5 Personal Computers Workstations mostly timesharing operating systems with a very interactive feel ranging from low end OS like CPM and DOS to very high end Unix boxes These tend to be more accessible to users 6 Multiple Processors A Multiple processors on one box these have tended to go away as a separate classification and have been collapsed in to the PC bucket Many if not most PC Workstation OS have support for multiple processors B Network OS multiple machine sharing services on a network This has also tended to collapse into the PC Workstation category Most machines for example have support for network file systems C Distributed OS makes multiple machines seamless Users shouldn t know or care where tasks are executed or resources reside 7 Specialized OS A Embedded OS special purpose for special devices think Palm OS B Real Time Moran OS Lecture 1 12 OS Concepts We will talk about Processes Threads Mutual Exclusion Process Scheduling Deadlocks Memory Management Disk Scheduling this is less of an issue than it once was because the hardware has gotten much smarter but it points up very important concepts File systems I O Security Moran OS Lecture 1 13
View Full Document
Unlocking...