COMP0068 Lecture11 Computer Start-Up
COMP0068 Lecture11 Computer Start-Up
Systems
Lecture 11: Computer Start-Up
Lecture Overview
2
A Processors’ (or Programmers’) Abstract
View of a Computer Peripherals
Data Bus (Input/Output
Devices)
Address Bus
INPUT/OUTPUT
CPU MEMORY
INTERFACES
3
How does this relate to real hardware?
Power
Supply
Hard
Disks
Motherboard 4
A typical
Motherboard
5
Typically these components interact to
“boot up” an operating system that then
runs user code
Boot loader
Hard Disk / (“BIOS”)
CPU / NAND Flash /
ROM /
Solid State
Processor Device NOR FLASH
6
1. On boot ... processor runs boot loader
instructions from ROM or NOR Flash
Boot loader
Hard Disk / (“BIOS”)
CPU / NAND Flash /
ROM /
Solid State
Processor Device NOR FLASH
MAIN MEMORY
(SRAM or DRAM)
7
What happens after turning on a
computer?
Suwan Waenlor/Shutterstock
Essential steps
1. BIOS(Basic Input/Output Service) starts
2. It loads settings from CMOS (boot order, date/time,
etc)
3. Initialises hardware devices
4. Run POST (Power-On Self-Test)
5. Looks for a bootable device with OS (Operating
System)
on it (e.g. the hard disk, flash drive, etc)
6. It hands over control to OS.
8
The BIOS
9
Accessing and configuring the
BIOS
• BIOS often has configurable options
– Values stored in battery-backed CMOS memory
10
Initialising Devices
• Scans, checks and initialises hardware
– CPU and memory
– Keyboard and mouse
– Video
– Bootable storage devices
• Installs interrupt handlers in memory
– Builds the Interrupt Vector Table …more later
• Runs additional BIOSes on expansion cards
– Video cards and SCSI cards often have their own BIOS
• Runs POST test
– Check RAM by read/write to each address 11
Bootstrapping
Find and load a real OS
• BIOS identifies all potentially bootable devices
– Tries to locate Master Boot Record (MBR) on each device
– Order in which devices are tried is configurable
• MBR has code that can load the actual OS
– Code is known as a bootloader
– Load the boot record into RAM
– Tells the CPU to execute the loaded code
• Example bootable devices:
– Hard drive, SSD, floppy disk, CD/DVD/Blu-ray, USB flash
drive, network interface card.
12
2. These transfer an operating systems
from disk / Flash / SSD into RAM and starts
executing it ...
Boot loader
Hard Disk / (“BIOS”)
CPU / NAND Flash /
ROM /
Solid State
Processor Device NOR FLASH
MAIN MEMORY
(RAM)
16
Executable File on Disk
Hard Disk /
Solid State
Device
17
MAIN MEMORY
(RAM)