当前位置:网站首页>A little knowledge of CPU, disk and memory
A little knowledge of CPU, disk and memory
2022-07-06 04:48:00 【licungeng】
The hardware in the computer only transmits and stores 01 Bit data .CPU Different voltages on both sides , Different results are obtained with the help of semiconductors . Operate the output voltage and input voltage of the element through language . All functions of the operating system are the scheduling kernel . If you write a program to dock with the kernel , Then the program can run in any version , If not , Will be limited by the version .
Have their own main method , What can run independently is called the main process . adopt .exe A file called main Method , Re pass main Method calls other methods . Program installation is to fill in the registration form according to the information .
Solid state disk is fast , But it has a service life , high price . The mechanical disk is slow , But there is no service life .
If the power-off data is not available, it is called flash memory , Data in is called permanent storage .
N Extremely 1,S Extremely 0.
The disk gives an initial voltage , Generate corresponding displacement and generate voltage , Read data according to voltage .
There are no sectors in Physics , Sectors are logically divided by the operating system , Each sector of the disk is the same size .
5400 turn / branch 、 Desktop computer 7200 turn / branch 、 The server 10000 turn / branch . Turn around 10ms about . Find a data average on disk 5ms about , Half a turn on average plus the swing of the manipulator .
CPU Read data from memory on average 20ns,CPU Run once on average 0.2ns.
1ms=1000μs=100 ten thousand ns.
CPU Operation can be operated at one time 64 The bit ,CPU The number of bits of the operating system depends on the amount of a single operation .
The data read from the disk will pass through a filtering device before reaching the memory , Illegal data will form a circuit break , Only legal data can form a channel . There will be location data before the data , The filtering device will judge whether the position data matches . The interference voltage will affect the internal circuit of the filter , Change the circuit , Control whether the data can pass .
Memory functions :
CPU Processing speed is too fast , The reading speed can't keep up with ,CPU Equivalent to idling , Waste resources . Memory can read data in batches . If you can support batch data reading , The disk can rotate one circle and get the data , Average 5ms, add CPU The time ratio of reading data from memory CPU It takes less time to read data directly from disk .CPU Not enough storage space , Only one data can be read one data , Time is too long .
The slow opening time of the program is from disk to memory , Running fast is memory to CPU.
CPU Pass address to memory , Memory should put that address back 1 Page total 4096 Bytes of data are passed to CPU
Bit shift , example 12bit,(5,7), each page 2^7, Yes 2^5 page
The role of the page : Support batch reading
Cache function : Reduce waiting time , Improve performance
In the mainstream CPU in , Generally, the cache is divided into level-1 cache 、 Second level cache 、 Three level cache , And the speed between them decreases , Capacity increases , Reading the information in the L1 cache requires 3 A cycle , And CPU The speed of processing operations is infinitely close , The cycle of reading L2 cache is about 10-15 A cycle , The third level cache takes 50 About a cycle .
Any core can only process one instruction at a time .
Due to the bus , At a certain moment, only one message comes from CPU The instructions of can operate on memory .
Semaphore mechanism
1、 After the first one is completely processed , Only the second one can read .
2、 After the first reading , Give the data a semaphore , After the second processing , Modify semaphore , Compare semaphores after the first one is processed , If not, read again .
Disadvantages of cache : It will cause data coverage
Lock mark : A lock mark will be added after reading the data , When the data is processed, the lock mark will be notified to be released . Semaphores do not notify , So you need to read the data again .
Saving data with arrays saves space than with variables .
The file is stored on disk , Variables exist in memory .
Sequential file storage can speed up the search , But there may be a problem of space .
Now the storage on disk is sequential storage , But when storing, there will be space left in the storage unit , It is convenient to modify data in the future
Pipelining technology will enable instruction rearrangement to reduce the number of switches , Improve overall performance , But there will be problems with multithreading .
边栏推荐
- ue5 小知识点 开启lumen的设置
- ue5 小知识 FreezeRendering 查看视锥内渲染的物体
- Bill Gates posted his 18-year-old resume and expected an annual salary of $12000 48 years ago
- Redis 排查大 key 的4种方法,优化必备
- 你需要知道的 TCP 三次握手
- Ue5 small knowledge points to enable the setting of lumen
- ISP learning (2)
- Vulnerability discovery - vulnerability probe type utilization and repair of web applications
- C'est un petit résumé de l'étude.
- Postman管理测试用例
猜你喜欢

The IPO of mesk Electronics was terminated: Henan assets, which was once intended to raise 800 million yuan, was a shareholder

麦斯克电子IPO被终止:曾拟募资8亿 河南资产是股东

11. Intranet penetration and automatic refresh

Basic explanation of turtle module - draw curve

ETCD数据库源码分析——etcdserver bootstrap初始化存储

IPv6 comprehensive experiment

Postman断言
![[detailed steps of FreeRTOS shift value for the first time]](/img/73/a469eb2465bb2c5acaa4d018d3edd3.jpg)
[detailed steps of FreeRTOS shift value for the first time]

A blog to achieve embedded entry

几种RS485隔离通讯的方案介绍
随机推荐
Leetcode 186 Flip the word II in the string (2022.07.05)
Word cover underline
Raspberry pie 3.5-inch white screen display connection
SharedPreferences source code analysis
2021 robocom world robot developer competition - undergraduate group (semi-finals)
canal同步mysql数据变化到kafka(centos部署)
Postman断言
Tengine kernel parameters
Sentinel sliding window traffic statistics
[try to hack] John hash cracking tool
win10电脑系统里的视频不显示缩略图
Lagrange polynomial
二叉树基本知识和例题
How to estimate the population with samples? (mean, variance, standard deviation)
Dynamic programming (tree DP)
The kernel determines whether peripherals are attached to the I2C address
Summary of three log knowledge points of MySQL
After learning classes and objects, I wrote a date class
驱动开发——第一个HelloDDK
web工程导入了mysql驱动jar包却无法加载到驱动的问题