OS 学习笔记 操作系统引导
Posted 临风而眠
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OS 学习笔记 操作系统引导相关的知识,希望对你有一定的参考价值。
OS 学习笔记(6) 操作系统引导
这篇笔记对应的王道OS 1.5 操作系统引导,同时参考了 《Operating System Concepts, Ninth Edition》和 俗称ostep的《 Operating Systems: Three Easy Pieces》还有 《Operating Systems: Principles and Practice》
文章目录
- OS 学习笔记(6) 操作系统引导
- 知识总览
- 什么是操作系统引导
- 磁盘里面有哪些数据
- 操作系统引导的过程(开机过程)
- 英文表达、术语积累(《操作系统概念》第九版、ostep 《OPERATING SYSTEMS THREE EASY PIECES》、《Operating Systems: Principles and Practice》)
知识总览
什么是操作系统引导
- 操作系统(如Windows、Linux等)是一种程序,程序以数据的形式存放在硬盘中,而硬盘通常分为多个区,一台计算机中又有多个或多种外部存储设设备。
- 操作系统引导是指计算机利用CPU运行特定程序,通过程序识别硬盘,识别硬盘分区,识别到硬盘分区上的操作系统,最后通过程序启动操作系统,一环扣一环地完成上述过程。
磁盘里面有哪些数据
Let’s consider as an example the boot process in Windows. First, note that Windows allows a hard disk to be divided into partitions, and one partition —identified as the boot partition—contains the operating system and device drivers. The Windows system places its boot code in the first sector on the hard disk, which it terms the master boot record, or MBR. Booting begins by running code that is resident(驻留的) in the system’s ROM memory. This code directs the system to read the boot code from the MBR. In addition to containing boot code, the MBR contains a table listing the partitions for the hard disk and a flag indicating which partition the system is to be booted from Once the system identifies the boot partition, it reads the first sector from that partition (which is called the boot sector) and continues with the remainder of the boot process, which includes loading the various subsystems and system services.
(《操作系统概念,9th ed》)
-
主引导记录(MBR)
MBR stands for Master Boot Record. It is a small program in the first sector of a disk (the sector is known as the “boot sector”) that is executed when the computer starts. The MBR contains the partition table for the disk, which describes the partitions (or divisions) of the disk and where they begin and end. The MBR is also responsible for loading the operating system’s boot loader, which in turn loads the operating system itself.
-
分区表: partition table
A partition table is a data structure on a storage device that defines how disk space is used. It includes information about the location, size, type and file system of each partition on the disk, allowing the operating system to access the data stored on the disk. The partition table is usually stored in the disk’s Master Boot Record (MBR) or the Guid Partition Table (GPT,全局唯一标识分区表).
-
启动代码:boot code
-
-
C盘里面有什么
- The “C” drive is a term used to refer to the primary hard drive partition on a computer running the Windows operating system. The C drive is typically where the operating system and system files are stored, as well as installed programs and user data. The contents of the C drive can vary based on the specific configuration of the system, installed programs, and user-created files and folders.、
操作系统引导的过程(开机过程)
ROM stands for Read-Only Memory, and it is a type of memory that is used to store data that cannot be changed or deleted. ROM chips are typically used to store firmware, which is low-level software that controls the basic functions of a computer.
Bios stands for Basic Input/Output System, and it is firmware(固件) stored in a ROM chip on the motherboard(主板) of a computer. The BIOS is responsible for initializing and testing the hardware components of the computer, and it also provides a basic interface for configuring the system settings. When a computer is first turned on, the BIOS performs a series of checks and initializations, including setting up the interrupt vectors and initializing the keyboard, then it loads the boot loader from the hard drive, which is used to load the operating system.
-
①CPU从一个特定主存地址开始,取指令,执行ROM中的引导程序(即自举程序)(先进性硬件自检,再开机)
-
②将磁盘的第一块–主引导记录(MBR)读入内存,执行
-
③从活动分区(又称主分区,即安装了操作系统的分区)读入分区引导记录,执行其中的程序
Windows中是C盘
PBR stands for “Program Boot Record”, and it is a boot sector of a hard drive partition that contains information required to load the operating system from the partition.
-
④从根目录下找到完整的操作系统初始化程序(即 启动管理器)并执行,完成“开机”的一系列动作
It is important to note that the BIOS has been largely replaced by the UEFI (Unified Extensible Firmware Interface), which provides improved security and compatibility compared to the traditional BIOS.
(25条消息) 怎么确定windows启动类型是bios还是uefi?_upzxt123的博客-CSDN博客
- 我去我的系统信息里面看了,我的电脑是UEFI(统一可扩展固件接口?)
英文表达、术语积累(《操作系统概念》第九版、ostep 《OPERATING SYSTEMS THREE EASY PIECES》、《Operating Systems: Principles and Practice》)
-
partition
- n. 隔墙,隔板;(国家的)分裂,分治;(化学)分离层;(计算机)存储分区;(数学)分割
- v. 分割,分裂(国家);(用隔板、隔扇等)隔开,分隔
-
sector
- n. 区域,部分;(尤指商业、贸易等的)部门,行业;小群体;(尤指军队控制的)分区,防区;(磁盘上的)扇区; 扇形,扇形面;函数尺,象限仪
- v. 把……分成扇形
boot sector 引导扇区;启动磁区
-
resident
- n. 居民,住户;(旅馆的)住宿者;<美>住院医生;<美> 寄宿制学校学生;<史>(英国政府派驻半独立国家的) 特派代表;驻外特工;留鸟,无迁徙习性的蝴蝶(或其他动物)
- adj. (在某地)居住的,居留的;常驻的;属于(某个群体)的;(鸟、蝴蝶等)非迁徙性的;(计算机程序、文件等在存储器中)驻留的
Booting begins by running code that is resident(驻留的) in the system’s ROM memory.
-
bootstrap program 引导程序(存在rom里面的)
-
For a computer to start running—for instance, when it is powered up or rebooted—it needs to have an initial program to run. This initial program, or bootstrap program, tends to be simple. Typically, it is stored within the computer hardware in read-only memory (ROM) or electrically erasable programmable read-only memory (EEPROM), known by the general term firmware. It initializes all aspects of the system, from CPU registers to device controllers to memory contents. The bootstrap program must know how to load the operating system and how to start executing that system.
-
bootstrap
- adj依靠自己力量的;自己做的
- n拔靴带
- 自举;引导;引导程序
-
以上是关于OS 学习笔记 操作系统引导的主要内容,如果未能解决你的问题,请参考以下文章