Download 7.3.1. Computer System Structures

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Computer System Structures
System Operation
 Computer System Operation
o Boot Process
o BIOS, UEFI
o Loaders, Init
o Interrupt Driven OS
Textbook Silberschatz, Chapter 2
Booting
 The procedure of starting a computer by loading the kernel
is known as booting the system.
 On most computer systems, a small piece of code known as
the bootstrap program or bootstrap loader
 locates the kernel
 loads it into main memory
 and starts its execution.
 Some computer systems, such as PCs, use a two-step
process in which
 a simple bootstrap loader fetches a more complex boot
program from disk
 which in turn loads the kernel.
After Reset
 CPU receives a reset event - powered up or rebooted
 The instruction address register is loaded with a predefined
memory location, and execution starts there.
 At that location is the initial bootstrap program.
 This program is in the form of read-only memory (ROM),
 because the RAM is in an unknown state at system startup.
 ROM is convenient because
 it needs no initialization (keeps the content with power off
computer)
 and cannot easily be infected by a computer virus.
Bootstrap Program - Requirements. Firmware
 The bootstrap program should be simple.
 It should not be lost when the power is off. So it should reside
somewhere in ROM.
 It should know how to load the OS.
 It should ensure that the hardware is OK.
 The bootstrap program usually is the part of the larger entity
called firmware – something between the hardware and
software
 Firmware is the combination of persistent memory and program
code and data stored in it
 It’s slow, expensive
The Booting Process, BIOS, UEFI, loaders, Init
The system’s
component
Resides on …
The Action
Power
on.
Start the
BIOS.
HDD
Initial Loader
UEFI
BIOS
OS Loader
Firmware(BIO
S, UEFI,
Uboot,
bootstrap, ..)
ROM
EEPROM
Initialize the
system
hardware.
Initial Boot
Loader
OS Loader
HDD Master
Boot Record
Recognize HDD
partitions.
Choose OS.
Call IBL
Call OS loader.
HDD Partition’s boot Kernel
sector
Load the OS
All the time
(kernel).
continuously
run in the
system waiting
Run kernel’s initial
events.
process.
1st partition Linux
2nd partition Windows
Init (initial
process)
Once more Interrupt driven OS
HW Signals
Interrupts
(Traps)
Hardware Interrupts
System Calls
Events
Software Interrupts
Init
Serving
Interrupts
Interrupt Vector Table
in Low Memory location
indexed by device numbers
Serving HW
Interrupts
Serving SW
Interrupts
Saving the current state in the stack
Serve Interrupt
Restore the saved state from the stack
 Modern operating systems are interrupt driven. If there are no processes
to execute, no I/O devices to service, and no users to whom to respond, an
operating system will sit quietly, waiting for something to happen.
 The occurrence of an event is usually signaled by an interrupt from either
the hardware or the software.