当前位置:网站首页>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 .
边栏推荐
- Coreldraw2022 new version new function introduction cdr2022
- win10电脑系统里的视频不显示缩略图
- Acwing week 58
- [lgr-109] Luogu may race II & windy round 6
- Summary of three log knowledge points of MySQL
- NPM command -- install dependent packages -- Usage / explanation
- Meet diverse needs: jetmade creates three one-stop development packages to help efficient development
- Sqlserver query results are not displayed in tabular form. How to modify them
- newton interpolation
- Sentinel sliding window traffic statistics
猜你喜欢
Crazy God said redis notes
Embedded development program framework
ue5 小知识点 开启lumen的设置
Bill Gates posted his 18-year-old resume and expected an annual salary of $12000 48 years ago
Use sentinel to interface locally
Basic explanation of turtle module - draw curve
Delete subsequence < daily question >
Visio draws Tai Chi
DMA use of stm32
Ue5 small knowledge points to enable the setting of lumen
随机推荐
Redis 排查大 key 的4种方法,优化必备
也算是学习中的小总结
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
IPv6 comprehensive experiment
How to realize automatic playback of H5 video
Postman断言
【Try to Hack】john哈希破解工具
Canal synchronizes MySQL data changes to Kafka (CentOS deployment)
Supreme Court, judgment standard of divorce cases
2021 robocom world robot developer competition - undergraduate group (semi-finals)
Redis has four methods for checking big keys, which are necessary for optimization
Acwing week 58
Why does MySQL need two-phase commit
[FreeRTOS interrupt experiment]
Quick sort
[数学建模] 微分方程--捕鱼业的持续发展
What should the project manager do if there is something wrong with team collaboration?
Visio draw fan
Dry goods collection | Vulkan game engine video tutorial
[detailed steps of FreeRTOS shift value for the first time]