HUST OS 3.1 operating system boot process notes [self]

Copyright: learning, can there be so many rules ~ https://blog.csdn.net/Irish_Moonshine/article/details/91128105

Chapter 3 operating system user interface

3.1 operating system boot process

3.2 operating system generates

3.3 User Interface

3.4 System Calls

3.1 operating system boot process

3.1.1 BIOS master boot record and MBR
3.1.2 operating system boot process
3.1.1 BIOS master boot record and MBR
  • Real mode and protected mode

  • Real mode (real-address mode, the MODE REAL)
    1. 8086 according to the addressing mode program to access 0h - FFFFFh (1MB) space
    2. addressing: a physical address (20) = address segment: offset address.
    3.CPU run single task

  • Protection mode (memory protection mode, the MODE PROTECT)
    1. Addressing: segment (32) and the offset (32), 4GB address space
    attributes segments: a start address, the access attribute, ... Access level
    2 paragraph page addressing scheme (section, page)
    3. virtual address, process, enclosed space
    4. applications and operating systems operating environment are protected
    5.CPU supports multitasking

1M space access real mode
1. [640K front 00000 - 9FFFF]: base memory
2. [intermediate 128K A0000 - BFFFF]: memory card
3. [256K end C0000 - FFFFF]: the BIOS;
[C0000 - C7FFF]: Display card BIOS
[C8000 - CBFFF]: IDE controller BIOS
[F0000 - FFFFF]: Finally 64KB, the system BIOS

  • BIOS: Basic I / O System ( Firmware, firmware)
    basic input / output system
    position [F0000 - FFFFF]
    Function:
    1. Start System Configuration
    2. The basic device I / O services
    POST and boot 3. System.

Interrupt type number is used by the BIOS 10H ~ 1FH

  • POST and bootstrap:
    Power On Self Test POST
    Power-SLEF the On the Test (POST)
    to initialize basic hardware
    CPU, memory, graphics card ...
    self-test does not normally prompt, an error by the horn tips.

Press the Reset button PowerOn or execution of the first instruction is
an instruction at the execution FFFF0 (JUMP POST; POST located within the system BIOS)

After POST ...
Find graphics card BIOS, call the graphics card BIOS;
order to locate other devices to perform the corresponding device BIOS;
Show splash screen ...

From the hard disk / floppy disk / drive / U disk read OS;
after the OS boot, the computer taking over by the OS

  • A master boot record the MBR
    the MBR:
    1. stored in the first sector of the hard disk / floppy disk
    2. The OS boot and storage related information (the Boot Reacord the Main)
    3.512 BYTES
    4. End: 0xAA55h

  • MBR / disk partition / formatted

MBR | Windows FAT32 / NTFS | LinuxEXT2 / EXT3 / other file systems

Partition boot sector (Partition Boot Sector); BootLoader, PBR

Master boot sector (Main boot sector): complete OS load or start the management functions:
1. To provide a menu: allows users to select a different startup items, multiple launch
2. Load a core file: directly to the area to start loading the operating system;
3 Jump: start management functions transferred to the other loader

  • BIOS and MBR running process
    1.POST-CMOS settings (hard disk) - Read MBR- control to the MBR
    2.MBR read the partition table (Partition Table), which found the active partition (Active Partition), and confirm other partitions are not active partition. MBR read active partition first partition (Partition Boot Record PBR) and load it into memory.
    3.PBR behind continues to control the boot process.
3.1.2 operating system boot process
  • Boot process
    from power-on to the user during the working environment ready
    1. Initial guide
    2. Core Initialization
    3. System Initialization

  • Initial boot:
    Objective: the OS kernel is loaded into memory and the computer system starts to take over the work
    procedure:
    power, the POST JUMP
    ... the BIOS boot program execution
    - startup program (BIOS positioned):
    the reading surface 0 0 1 sector content (MBR)
    loads the boot program of the MBR
    - a boot program (MBR located, mainstream the GRUB):
    the document reading position in accordance with parameters specified hard disk to the memory of
    the hard disk loading OS kernel, initialization and basic parameters
    -OS kernel:
    stepwise loading OS remaining portion of the last full control of the computer

  • Initialization core
    purpose: the core OS kernel initialization data systems
    typically work:
    initialize the various registers of the
    storage system initialization and page table
    core process of building
    ...

  • System initialization
    purpose: to prepare for the user to use the system, the system is in standby
    main work:
    initialize the file system
    to initialize the network system
    initialization console
    initialization graphical interface
    ...

  • Windows boot process
    1.POST
    after power-up self-test program the host BIOS startup
    2. Initial guidance
    specific location BIOS reads the boot program from the MBR, into memory the
    boot program starts DOS7.0, transferred to the operating system kernel
    WINDOWS system began to take over
    3. core initialization
    resource state, data initialization core
    4. The system initialization
    GUI interface generation, the system is in standby / acceptance status message

  • Linux boot process
    1.POST
    2.MBR
    3.KERNEL image (non-compressed part of the code, the code is behind the majority of compression, which is very beneficial to embedded systems)
    4.KERNEL images and perform self-extracting
    5. kernel initialization
    6 The kernel boot

  • After the kernel has finished booting, loading the init process
    1. Process No. 1.
    2.init process is initialized by the / etc / inittab script
    different run levels (Runlevel) / etc / inittab different script
    3. script file / etc / inittab
    init process according to / etc / inittab execute the corresponding system initialization script
    is provided a keyboard, a font, a load module, provided the network and the like.

Guess you like

Origin blog.csdn.net/Irish_Moonshine/article/details/91128105