CPU-intro Flashcards
By running one process, then stopping it running another, the OS promote the illusion that many virtual CPUs exist when in fact there is only one physical CPU (or a few). This technique is also called.
Time sharing of the CPU
What does time sharing allow users to do?
Run many concurrent processes
Negatives with time sharing of CPU
Performance cost, as each will run more slowly if the CPU(s) must be shared.
Low-level machinery of the OS is called
Mechanisms
Explain mechanisms
Are low-level methods or protocols that implement a needed piece of functionality. Mechanisms are the implementations that enforce policies, and often depend to some extent on the hardware on which the operating system runs.
Name an example of low-level machinery
Context switch, it is a time-sharing mechanism employed by the OS
What ability does the context switch give the OS?
Ability to stop running one program and starting running another on a given CPU
Explain what policies are
Policies are algorithms for making some kind of decision within the OS.
Give an example of a policy within the OS
Scheduling policy (deciding which processes should run)
The abstraction provided by the OS of a running program.
Process
What a program can read or update when it is running
Its machine state
Name components of machine state that comprises a process
Memory, registers, storage device
The memory that the process can address
Address space
What are the process registers?
Many instructions explicitly read or update registers, important to the execution of the process.
Give an example of the processes registers
Program counter (PC)
What is the program counter
It tells us which instruction of the program that is currently being executed.