Chapter 1 Topics For Today Computer Startup: Firmware
Chapter 1 Topics For Today Computer Startup: Firmware
CMPT 300 Introduction to Operating Systems Page 3 CMPT 300 Introduction to Operating Systems Page 4
ì Computer-system operation ì We want the I/O devices and the CPU to be able to
ì One or more CPUs, device controllers connect through a execute concurrently
common bus providing access to shared memory ì The CPU shouldn’t have to wait for the MUCH slower I/O
device
ì The I/O device signals an interrupt when it is ready
ì When an interrupt occurs, the operating system must:
ì
ì
CMPT 300 Introduction to Operating Systems Page 5 CMPT 300 Introduction to Operating Systems Page 6
CMPT 300 Introduction to Operating Systems Page 7 CMPT 300 Introduction to Operating Systems Page 8
5. Data transferred from controller to memory or from ì The CPU and device controllers operate in parallel.
memory to controller depending on whether input or ì Two types of I/O operations:
output operation
ì synchronous: user program waits until I/O operation
6. CPU registers restored completes
7. Control returned to user program ì asynchronous: user program allowed to continue while I/O
operation is in progress
ì
ì Asynchronicity is essential for multiprogramming
ì
CMPT 300 Introduction to Operating Systems Page 9 CMPT 300 Introduction to Operating Systems Page 10
CMPT 300 Introduction to Operating Systems Page 11 CMPT 300 Introduction to Operating Systems Page 12
Storage Structure –
Storage Structure
Magnetic Disks
ì Typical (von Neumann) instruction-execution cycle ì Magnetic disks – rigid metal or glass platters covered
ì instruction loaded from main memory into CPU with magnetic recording material
ì Main memory – only large storage media that the CPU can ì Disk surface is logically divided into tracks, which are
access directly subdivided into sectors.
ì instruction decoded ì The disk controller determines the logical interaction
between the device and the computer.
ì
CMPT 300 Introduction to Operating Systems Page 15 CMPT 300 Introduction to Operating Systems Page 16
CMPT 300 Introduction to Operating Systems Page 19 CMPT 300 Introduction to Operating Systems Page 20
The next step up is the Multiprogrammed Batch System Some of the OS features needed for Multiprogramming:
ì Several jobs are kept in main ì I/O routine supplied by the system
memory at the same time, and the ì Memory management
CPU is multiplexed among them
ì
ì ì CPU scheduling
ì
ì Personal computers – computer system dedicated to a ì Multiprocessor systems are systems with more than
single user one CPU in close communication.
ì I/O devices – keyboards, mice, monitors, printers ì E.g. multi-core CPUs
CMPT 300 Introduction to Operating Systems Page 23 CMPT 300 Introduction to Operating Systems Page 24
ì Another idea is to distribute the computation among ì A real-time system is one where there are well-defined
several physical processors fixed-time constraints
ì This is a loosely coupled system – ì I.e. things need to happen in a reasonable amount of time
and in the correct order
ì Each processor has its own local memory
ì Some examples:
ì
CMPT 300 Introduction to Operating Systems Page 27 CMPT 300 Introduction to Operating Systems Page 28