4 types of instruction
Types of interrupts
Program - Generated by some condition that is a result from an instruction execution
Timer - Generated by a timer within the processor that ca be programmed to trigger at regular interval or after a certain amount of time has passed
I/O - Generated by an I/O controller to signal completion of an operation or some other condition
Hardware failure - Generated by a failure in the hardware
Note: Can have sequential interrupts or nested interrupts (interrupts within interrupts)
Instruction Categories:
• Processor-memory: Instructions for transfer data between processor and memory.
• Processor-I/O: Instructions for
transferring data between
processor and peripheral devices through an I/O module.
• Data processing: Instructions for doing arithmetic or logical
operations on data.
• Control: Instructions that alter the sequence of execution.
What is the prupose of cache memory?
Why do we need an operating system at all? (Or do we really?)
The Stallings book describe three reasons for having an operating system
• Convenience
-The user interacts with the OS rather than hardware
• Efficiency
-Scheduler, control of memory and access of I/O resources
• Ability to evolve
-Must support new hardware, services and updates.
What is a process?
A process is an entity that can be assigned to and
executed by a processor.
What does a process consist of?
• The program code that defines what the process does.
• Basically the source code you write.
• Shared between all processes that execute the same
program.
• The set of data associated with the process.
• Each process has their own set of data.
• Stored in a process control block data structure.
• OS has to manage the data structures of the different
processes.