operating systems - introduction
DESCRIPTION
Operating Systems - Introduction. S H Srinivasan [email protected]. What is an OS?. Collection of software that makes the computer usable processes sharing useful to to many applications abstraction Between the application and the hardware. Layers. - PowerPoint PPT PresentationTRANSCRIPT
![Page 2: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/2.jpg)
What is an OS?
• Collection of software– that makes the computer usable
• processes
• sharing
– useful to to many applications• abstraction
• Between the application and the hardware
![Page 3: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/3.jpg)
Layers
Banking Airline Games APPLICATIONS
Compilers Editors Shell SYSTEM--------------------------------- system calls kernel PROGRAMS--------------------------------- device driversMachine languageMicroprogramming HARDWAREPhysical devices
![Page 4: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/4.jpg)
Why an OS?
• Functionality (ease of use)– timesharing– networking
• Abstractions (ease of programming)– sockets, pipes, ...
• Performance (efficiency)– manage resources efficiently
![Page 5: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/5.jpg)
OS as an idealized machine
• Physical machine– single processor– limited memory– complex devices– limited security
• physical machine + OS = idealized machine
![Page 6: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/6.jpg)
Idealized Machine
• As many processors as the number of programs
• Unlimited memory
• Clean and uniform device interfaces
• Access control
• Efficient resource use
![Page 7: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/7.jpg)
OS in action% lsMail work games%
Behind the scenes operations:(shell) print prompt WAIT for user input(user) type “ls”(device driver) read the keyboard inform the kernel(kernel) send it to the shell(shell) look for executable code “ls” make “system calls”(kernel) determine the type of file system cached, on-disk, cdrom, network
![Page 8: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/8.jpg)
OS in action (contd)
(shell&kernel): get the contents of directory(shell): format the output(device driver): display on CRT
Other operations: file permissions (can’t execute a text file) directory access (ls /secret) quota (ls > listing)
![Page 9: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/9.jpg)
OS in action (bigger picture)
init
init init init
getty getty getty
login
/bin/sh /bin/sh
/bin/date
![Page 10: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/10.jpg)
Is the complexity worth?
• Abstraction– process– file (harddisk, cdrom, network, terminal)
• Sharing– cpu, memory, devices
• Control– access (file, memory, device)
• Performance
![Page 11: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/11.jpg)
Layers
• Shell - user– cd
• System calls - system programmer– chdir
• Software architecture - designer– kernel, file system, networking, ...
• Implementation
![Page 12: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/12.jpg)
Concepts
• Principles behind architecture and implementation
• well-known algorithms
• well-known problems
![Page 13: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/13.jpg)
Well-known OSs
• Multics
• Unix– Linux– BSD
• MS Windows
• Realtime OS
![Page 14: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/14.jpg)
History of OS
• Late 50’s - Early 60’s– batch processing
• Late 60’s - 70’s– Multiprogramming– time sharing– new abstractions
![Page 15: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/15.jpg)
History of OS (cont’d)
• 80s - 90s– GUI– network support– network transparency
![Page 16: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/16.jpg)
Multiprogramming
• Goal: keep CPU busy
• Fact: I/O times are large
• When one program is waiting for I/O, run another program
• => Multiple programs resident in memory
• Scheduling: non-preemptive
![Page 17: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/17.jpg)
Time sharing
• Goal: allow access to multiple users at the same time
• Fact: People’s response time is large
• Schedule the programs fast
• Scheduling: preemptive
![Page 18: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/18.jpg)
Major Unix Flavors
• First Edition: Bell Labs, 1969
• 1BSD: UC, Berkeley, 1977
• System V: 1983
• POSIX standard
![Page 19: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/19.jpg)
• Linux (open source)
• Solaris (Sun)
• AIX (IBM)
• FreeBSD (open source)
![Page 20: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/20.jpg)
OS organization
Libraries process process process (user) ---------------------------------------------------------Kernel Device Drivers (supervisor)
Processor(s) Main Memory Devices
![Page 21: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/21.jpg)
Kernel
• Process & resource manager
• Memory manager
• File manager
• Device manager
![Page 22: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/22.jpg)
Processor Modes
• Mode bit: supervisor or user
• Supervisor mode– can execute all machine instructions– can reference all memory locations
• User mode– subset of instructions– subset of memory locations
![Page 23: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/23.jpg)
Kernel
• Trusted, management software
• executes in supervisor mode
• can enter user mode
• How does a user program invoke a kernel operation?
![Page 24: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/24.jpg)
Trap instruction
• Trap is like a function call– mode is set to supervisor– address of function is looked up from a table– the function body is executed
• Direct invocation of the function is not permitted
![Page 25: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/25.jpg)
Other OS organizations
• Object-oriented– object = data + associated procedures
• Microkernel– most of the services implemented at the user
level (servers)– kernel provides only the communication
between servers
![Page 26: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/26.jpg)
Realtime OS
• Performance guarantees
![Page 27: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/27.jpg)
Administration
• Class webpage– www.cs.ucsd.edu/classes/sp00/cse120_A/
• Bulletin board– send mail to [email protected]
• Section: Fri 12:20-1:10 , CSB 001
• Text: Modern Operating Systems, Tanenbaum
![Page 28: Operating Systems - Introduction](https://reader030.vdocuments.site/reader030/viewer/2022013101/56813ff9550346895dab291e/html5/thumbnails/28.jpg)
Evaluation
• Four group (of 3) assignments– programming– report– 12.5% each
• Midterm (20%)
• Final (30%)