Download Operating System - Operating Systems - Lecture Slides and more Slides Computer Science in PDF only on Docsity!
Operating Systems
Lecture 03:
Operating System Overview
Today
• Announcements:
- Proposal: change in TAs schedule
- Piazza
- Slides posted before class on course page:
• Operating Systems Overview:
- Definitions (as many variants as textbooks…)
- Historical perspective
• Solution today’s “jeopardy”
- Grade yourself and hand it to me
Operating System
- An interface between user applications and
hardware
- A service provider
- A program that manages computer resources
The Operating System as a
User/Computer Interface
This image cannot currently be displayed.
The Operating System as a
Service Provider
- Program development (not really part of OS)
- Program execution
- Access I/O devices
- Controlled access to files
- System access
- Error detection and response
- Accounting
Operating System
as Software
- Functions in the same way as ordinary
computer software
- Program, or suite of programs, executed by
the processor
- Frequently relinquishes control and must
depend on the processor to allow it to regain control
Evolution of Operating Systems
A major OS will evolve over time for a
number of reasons:
Hardware upgrades
New types of hardware
New services
Fixes
In the Beginning…
In the beginning: Expensive Hardware, Cheap People.
Goal: maximize hardware utilization.
(Now: Cheap Hardware, Expensive People.)
Goal: make it easy for people to use computer.
1940s to mid 1950s:
computers were huge machines, expensive to buy, run and
maintain
used in single user, interactive mode
programmers interact with the machine at a very low
no OS.
The Growth of the OS (2)
- Problem: Scheduling:
- Setup time: a considerable amount of time was spent just on setting up the program to run
- Hardcopy sign-up sheet to reserve computer time - Solution: - Hire specialized human - Faster, but still human - Build a batch monitor - Store jobs on disk - computer loads them into memory and executes them - (one at a time) - Huge improvement! - Debugging offline from printouts and memory dumps
Resident Batch Monitor
- Monitor controls the sequence of events
- user no longer has direct access to processor
- job is submitted to computer operator who batches them together and places them on an input device
- program branches back to the monitor when finished
- Resident Monitor is software always in memory
- Monitor reads in job and gives control
- Job returns control to monitor
Job Control Language (JCL)
Special type of programming language used to provide instructions to the monitor
what compiler to use
what data to use
Desirable Hardware
Features
- while the user program is executing, it must not alter the memory area containing the monitor
Memory protection for monitor
- prevents a job from monopolizing the system
Timer
- can only be executed by the monitor
Privileged instructions
- gives OS more flexibility in controlling user programs
Interrupts
Simple Batch System Overhead
- Processor time alternates between execution of user programs and execution of the monitor
- Sacrifices:
- some main memory is now given over to the monitor
- some processor time is consumed by the monitor
- Despite overhead, the simple batch system improves utilization of the computer
The Growth of the OS (3)
time, the job is either using the OS or I/O (resource underutilization)
cannot keep both CPU and I/O busy
- Solution: allow the job to overlap I/O and computation - Buffering and interrupt handling added to the subroutine library
- Solution: multiprogramming