Lecture 1-Kernel Flashcards
Whats is a Computer System Structure?
A computer system consists of hardware and software.
Software: application software and system software.
Operating system is the most important system software.
What is a Operating system?
A computer program that mediates between hardware and application programs.
Consists of many loosely related parts handling Memory management I/O management CPU Scheduling Communications? Multitasking/multiprogramming?
Principles:
Keep user programs from Crashing OS and each other
Allocate resources eciently and fairly
We will study algorithms run by these parts.
Assumption: single-processor computer
What is a Network?
A network is two or more computers connected by a physical
medium.
Distributed systems?
Distributed system is a program than runs on two or more computers.
We will implement a simple distributed system based on the client-server architecture.
Detailed discussion of the subject is oered by the “Distributed system” module.
What is a Interrupt System?
Interrupt is a key technique for OSs
Interrupt alerts the OS when some event occurs, e.g.,
When an I/O occurs, execution of one program is suspended.
CPU could be switched to execute another program.
When the I/O completes, an interrupt will occur, which diverts.
execution to the interrupt handling routine
The suspended program may restart.
Interrupt enables OSs to oversee programs and I/O events simultaneously
What are the types of interrupts?
I/O Interrupt: by I/O devices to signal completion or error
Timer: by a clock within the CPU; used to alert the OS at pre-set intervals on time critical activities
Hardware Error: by hardware faults
Program: by error conditions within user programs, e.g., division by zero
What is Kernel Mode?
OS needs to protect users from each other for security
If a user had access to all machine instructions, then the user could do anything an OS can
The solution is for the CPU to have a special operating mode, the kernel or supervisor mode, which can only be invoked by the OS
In the kernel mode, OS can execute certain privileged instructions,
e.g., I/O operation and system data modication, which are not available to normal program (user mode)