10.5.2 Boot Block 启动块 - 操作系统教程

简单一篇文章明白地讲解了计算机操作系统的启动过程

OPERATING SYSTEM CONCEPTS
ABRAHAM SILBERSCHATZ
PETER BAER GALVIN
GREG GAGNE

10.5.2 Boot Block

For a computer to start running—for instance, when it is powered up orrebooted—it must have an initial program to run. This initial bootstrap program tends to be simple. It initializes all aspects of the system, from CPU registers to device controllers and the contents of main memory, and then starts the operating system. To do its job, the bootstrap program finds the operating-system kernel on disk, loads that kernel into memory, and jumps toan initial address to begin the operating-system execution.

For most computers, the bootstrap is stored in read-only memory (ROM).This location is convenient, because ROM needs no initialization and is at a fixed location that the processor can start executing when powered up or reset. And,since ROM is read only, it cannot be infected by a computer virus. The problem isthat changing this bootstrap code requires changing the ROM hardware chips. For this reason, most systems store a tiny bootstrap loader program in the boot ROM whose only job is to bring in a full bootstrap program from disk. The full bootstrap program can be changed easily: a new version is simply written onto the disk. The full bootstrap program is stored in the “boot blocks” at a fixed location on the disk. A disk that has a boot partition is called a boot disk or system disk.

The code in the boot ROM instructs the disk controller to read the boot blocks into memory (no device drivers are loaded at this point) and then starts executing that code. The full bootstrap program is more sophisticated than the bootstrap loader in the boot ROM. It is able to load the entire operating systemfrom a non-fixed location on disk and to start the operating system running. Even so, the full bootstrap code may be small.

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 devicedrivers. The Windows system places its boot code in the first sector on the harddisk, 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, as illustrated in Figure 10.9. 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.

时间: 2024-10-24 18:28:58

10.5.2 Boot Block 启动块 - 操作系统教程的相关文章

生产环境提升rman备份速度----启动块跟踪

[环境] AIX(5300-08).oracle10g(10.2.0.1.0-64bit) [目标] 由于生产环境数据量较大,欲加快rman备份的速度 [方法] 启动块跟踪 [操作] SQL> alter database enable block changetracking using file '/home/oracle/block.trc'; Database altered. SQL> select filename fromv$block_change_tracking; FILE

spring boot应用启动原理分析

spring boot quick start 在spring boot里,很吸引人的一个特性是可以直接把应用打包成为一个jar/war,然后这个jar/war是可以直接启动的,不需要另外配置一个Web Server. 如果之前没有使用过spring boot可以通过下面的demo来感受下. 下面以这个工程为例,演示如何启动Spring boot项目: git clone [email protected]:hengyunabc/spring-boot-demo.git mvn spring-b

操作系统的自我修养-04 从U盘启动MerxOs操作系统

转载注意出处:K_Linux_Man 我们一直都是使用bochs模拟器来启动我们的MerxOs操作系统,模拟真的不好玩,我们今天就让我们的"MerxOs:Hello,World" 运行在真机上.现代化的今天, U盘早已经替代软盘,所以我们以U盘为例,讲述如何让我们的MerxOS操作系统从U盘加载. U盘的第一扇区 U盘的第一个扇区由三部分组成: 第 1 部分(0x0000~0x01BD)446 个字节为MBR,MBR(Master Boot Record)主引导扇区,我们的MerxOs

loadrunner提高篇-block(块)技术和参数化

Block(块)技术 block(块)技术是应用于在一个脚本中实现不同事务.不同次数循环或不同百分比循环的情况.比如在一个脚本中,登录执行3次,查询执行1次. 使用方法如下: 1.录制一个脚本,包含2个业务:登录和查询 2.vuser->run time settings->general->run logic,选择run,插入一个block块,然后选择block(),单击insert action按钮,选中要添加的action,如图1所示: 图1(为block添加action) 3.重

转:Loadrunner——Block(块)技术

在使用LoadRunner时经常遇到这样一个问题,如果对不同的事务进行不同次数的循环该怎么处理?默认情况下LR对所有的事务都是统一执行的,即虽然有多个事务,但它们被执行的循环次数都是一样的,那么LR如何在一个脚本中实现不同事务不同次数的循环或不同百分比的循环呢? 案例:假设在一个脚本中,想实现注册执行3次,登录执行1次,查询执行2次,怎么办?录3个脚本?每个事务分别在脚本中复制N次?这样是可以解决问题,但不是最好的解决办法,LoadRunner提供了对业务流程的处理方法,即Block(块)技术.

spring boot无法启动,或者正常启动之后无法访问报404的解决办法

以前用spring boot都是用idea的自动创建,或者是用的Jhipster创建的,就没有深究怎么去搭建.但是今天晚上心血来潮,想自己搭一个demo来整合一些技术,于是就花一点时间来手动搭.因为今天网络有点不好,所以spring boot的官网一直打不开,也就导致了无法阅读官方文档,就按照自己的记忆去搭于是遇到了以下两个问题 一 启动不了,一直报错,而且报的错很多时候还不一样.我就不列出报的什么错了,spring boot已经这么集成化了,难道我都还要配错?肯定是细节,和代码没有关系.于是找

objc反汇编分析,block函数块为何物?

上一篇向大家介绍了__block变量的反汇编和它的伪代码,本篇函数块block,通常定义成原型(^){},它在反汇编中是什么东西. 我们先定义将要反汇编的例子,为减少篇幅例子采用non-arc环境. NSString* a = @"abc"; NSString* b = [NSString stringWithUTF8String:"abc"]; NSString* c = [@"ab" stringByAppendingString:@&quo

block 代码块 反向传值

block 代码块 也称作闭包 与C语言函数类似  具有反向传值.回调的功能 block公式分两种: ①声明和实现写到一块的公式 返回值类型(^block名字)(参数列表 参数类型 参数名) = ^(参数列表 参数类型 参数名){ 实现代码(如果有返回值 需要return 返回值类型的值) }; 调用:block名字(参数); ②声明和实现分开写的公式 (1)声明 返回值类型(^block名字)(参数列表); (2)实现 block名字 = ^(参数列表){ 实现代码(如果有返回值 需要retu

block(块级元素)和 inline(内联元素) 的区别

<td style="word-break:break-all"> 强制换行 <td  style="width:80px;display:block;boverflow: hidden;">超出隐藏,注意要设置宽度. 内联转化为块状:display:block 或 float:left / right 块状转化为内联:display:inline; 但是要注意内联元素是不能设置宽度和高度的.那就要强制把内联元素转换为块级元素了 div这样的