Week 1 - Introduction Flashcards
What is an OS?
System software that manages computer hardware and controls processing.
Position of OS
User mode like applications, user interface programs.
Kernel mode is the Operating System.
User and Kernel Mode are part of the Software.
Hardware is under all of this.
System Software:
Application Software:
System: Operating System and utility programs that control a system.
Application: Programs that allow user to perform specific tasks on computer.
Characteristics of an OS
Extended Machine: I/O allows for reading and writing control register, handling interrupts.
Mistakes can crash computer.
Resource Manager: Many different processes are happing simultaneously.
Ensures that the requests in to process make to I/O Systems, memory. To ensure smooth function of system.
CPU
Central Processing Unit reads a program from memory, and executes that program.
CPU Organization
Contains Control Unit,
Arithmetic Logic Units,
Cache memory,
Memory Management Unit.
Registers
Small amounts of fast storage built in CPU, typically for words of data.
Nowadays 32 or 64 bits.
Used to store next instruction to be executed and the current instruction decoded.
CPUs have registers to form a state of computation.
General Purpose Registers
x86 has 8 registers for example:
EAX is Accumulator.
EBX is Base.
ECX is Count.
EDX is Data.
ESI is Source Index.
EDI is Destination Index.
EBP is Base Pointer.
ESP is Stack Pointer
User and Kernel Modes
CPUs support different modes of operation such called the Program Status Word.
Machine code running while CPU is in user mode can only use limited instructions, not e.g. like IN and OUT Instructions.
Only Kernel mode can use privileged instructions, e.g IN and OUT instructions.
Recent x86 Processes use by bit 0 of the Control Register, CR0. If bit is set it is in user mode or protected mode.
Kernel meaning
Computer program that is core of the operating system and controls everything in the system.
Interrupts
When an I/O controller has requested data available, it must make CPU aware!
This is done through an electrical signal called Interrupt.
CPU will temporarily abandon what is doing, and execute specialised code to deal with new event.
Specialised code is called Interrupt Handlers, installed at boot time.
(Run at Kernel Mode)
IRQ
Interrupt Request