Operating System-Lecture 3
Operating System-Lecture 3
Operating System-Lecture 3
CPU scheduling
All of this leads to:
– memory management
– resource scheduling
– deadlock protection
Major facilities provided by the OS are :
• Easy interaction between humans and computers
• Starting computer operations automatically when power is turned on
• Loading and scheduling users’ programs along with necessary compilers
• Controlling input and output
• Controlling program execution
• Scheduling processes
• Managing use of various levels of memory
• Managing and manipulating files
• Providing security to files and jobs
• Accounting resource usage
Evolution of Operating System
• Serial Processing
– No operating system
– Machines run from a console with display lights, toggle
switches, input device, and printer
– Schedule time
– Setup included loading the compiler, source program,
saving compiled program, and loading and linking
• Simple Batch Systems
– Monitors
• Software that controls the sequence of events
• Batch jobs together
• Program branches back to monitor when finished
– Job Control Language (JCL)
• Special type of programming language
• Provides instruction to the monitor
– What compiler to use
– What data to use
Batch Processing
• Batch: Group of jobs submitted together
– Operator collects jobs; orders efficiently; runs one at a time
• Advantages
– Amortize setup costs over many jobs
– Operator more skilled at loading tapes
– Keep machine busy while programmer thinks
– Improves throughput and utilization
• Problems
– User must wait until batch is done for results
– Machine idle when job is reading from cards and writing to printers
•
History of Operating Systems
• OS Functionality
– Add back time-sharing, protection, and virtual memory
Current Systems
• Conclusion: OS changes due to both hardware and users
• Current trends
– Multiprocessors
– Networked systems
– Virtual machines
• OS code base is large
– Millions of lines of code
– 1000 person-years of work
• Code is complex and poorly understood
– System outlives any of its builders
– System will always contain bugs
– Behavior is hard to predict, tuning is done by guessing
Multiprogramming
• While one job waits for a resource, the CPU can find another job to run. It
means that several jobs are ready to run and only need the CPU in order to
continue.
History of Operating Systems
Execute
Fetch Decode unit
unit unit
Fetch Decode
unit unit Execute
unit