当前位置:网站首页>Do you know how the computer starts?
Do you know how the computer starts?
2020-11-09 01:10:00 【Hakou】
The last issue was about computer hardware , In this issue, let's take a look at how it starts when you put the hardware together .
Let's start with an introduction : What happens when we press the power button to the screen to display the operation interface ? A lot of people may say that this is just starting the operating system . o , It's not a complete process . If you can't give a general description of how it started , I think this article is for you .
After we press the power button on the chassis , The power supply supplies power to the motherboard , The components on the motherboard are all in power on The state of . Then initialize BIOS System .BIOS The system is a program located on the motherboard , It can control the hardware and the hardware settings ( For example, whether to turn on Virtualization 、 Disk device boot sequence, etc ).
BIOS The system will Burn in a device that won't lose data due to power failure ROM Inside , Generally speaking, the motherboard comes with itself BIOS.
The picture above is more common BIOS Interface , Now the better motherboard is not this style . The machine I'm using now is BIOS The system is similar to the following :
such BIOS Also known as UEFI BIOS, It's the same as before BIOS The biggest difference is Support mouse operation , The picture is more friendly .UEFI BIOS It's ancient BIOS Inheritance and extension , Their relationship is similar to Windows XP And Windows 7. Ancient BIOS Common in notebooks and older PC.
BIOS After the initialization ,CPU Read BIOS The content in . stay X86 Type of CPU After power up ,CPU The physical address will be read 0xFFFF0, And this address corresponds to BIOS Region .
BIOS The job is quite simple , The main job is Perform the host self test (POST), Then find out which disk the operating system exists on , Load the operating system into .BIOS Looking for disks The operating system of , It is mainly to find the first sector on the disk (0 Noodles 0 Magnetic track 1 A sector ), Each sector is 512 byte , If this is a boot sector , Then load it into 0x7C00 On the memory address of , Then jump to this address and execute . If this is not a boot sector , Just keep looking for the next disk , See if there is a boot sector on it . If there is no boot sector on all disks , On the screen Print out an error message .
The boot sector has only A sector is 512 Byte size , So its main purpose is to read the kernel of the operating system into memory , Then jump to the operating system kernel and start executing . From the point of view of writing an operating system , Ahead CPU Power on and BIOS None of the work of the operating system can control , and Start with the boot sector , It can be completely controlled by the operating system 了 , therefore , Writing a boot sector is also writing an operating system One of the necessary jobs . from BIOS After jumping into the boot sector , Computer system boot work is done , How to read the operating system kernel into memory and then arrange a jump instruction to jump to the kernel is the work of the operating system developers .
therefore , The starting process of the computer is :
- Press the power button
- Power up the motherboard , start-up BIOS
- BIOS Start self-test , And find the boot information on each disk
- Execute the boot sector program , Start the operating system
- The operating system comes from BIOS Take over the computer and start
- The operating system boot is complete , The computer is booted up
ps. Welcome to the official account " Hackle ".
版权声明
本文为[Hakou]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢
Programmers should know the URI, a comprehensive understanding of the article
写时复制集合 —— CopyOnWriteArrayList
移动大数据自有网站精准营销精准获客
What are the basic requirements for big data posts?
Copy the picture
Windows环境下如何进行线程Dump分析
如何通过Sidecar自定义资源减少Istio代理资源消耗
SaaS: another manifestation of platform commercialization capability
Teacher Liang's small class
Flink的DataSource三部曲之三:自定义
随机推荐
六家公司CTO讲述曾经历的“宕机噩梦”
老大问我:“建表为啥还设置个自增 id ?用流水号当主键不正好么?”
C++邻接矩阵
Linked blocking queue based on linked list
你有没有想过为什么交易和退款要拆开不同的表
Python应用场景多不多?
Concurrent linked queue: a non blocking unbounded thread safe queue
作业2020.11.7-8
Decorator (1)
Flink的DataSource三部曲之三:自定义
Platform in architecture
How does semaphore, a thread synchronization tool that uses an up counter, look like?
代码保存
使用递增计数器的线程同步工具 —— 信号量,它的原理是什么样子的?
First development of STC to stm32
Copy on write collection -- copyonwritearraylist
Dynamic relu: Microsoft's refreshing device may be the best relu improvement | ECCV 2020
分库分表的几种常见玩法及如何解决跨库查询等问题
How to deploy pytorch lightning model to production
android开发中提示:requires permission android.permission write_settings解决方法