Introduction to "How Programs Run"

1 Introduction

In my spare time, I read the book " How Programs Run ". Quite pleased. Take this opportunity to share.
Insert image description here
This book can be positioned like this:

  • For students: It is very suitable as an appetizer before professional courses, especially as an introductory material for the two courses " Principles of Computer Composition " and " Operating Systems ".
  • For computer-related enthusiasts and practitioners : You can check and fill in the gaps from the book, which involves a lot of low-level knowledge. If you are a non-computer major student, if you have studied " Microcomputer Principles " or " Single Chip Microcomputer Principles and Interface Technology ", you can compare and study them, and the effect will be better.

It is recommended that you have a certain foundation in assembly language and C language before reading this book. It would be better if you also have a little bit of digital electronics knowledge.

Generally speaking, this book is easy to understand. Even if you don’t have any computer foundation, you will be very fruitful after reading it. The main content of this book is introduced below.

2. Main content

The main content of the book is shown in the picture below ( warm reminder: If you can’t see clearly, you can enlarge the entire web page to browse ):
Insert image description here
Since we talk about programs and operating environments, it is inevitable to involve both software and hardware. Therefore, the scope of this book is relatively broad.

This book starts from the most basicCPUStarting from the working process, then to the binary system, from the shallower to the deeper, it will be explained in detail. What is the relationship between CPU and registers? What types of registers are there and what are their functions?

How are binaries generated? How to represent data? Why do problems occur when performing decimal operations? All have been analyzed in detail.

Regarding memory, the book mentions the common pin configurations of memory chips, the basic reading and writing process of data in the chip, and then introduces commondata structure

After the introduction of memory, we come to "external memory", which is the so-calleddisk, as we all know, if the CPU directly reads and writes data from the disk, the efficiency will be very low. At this time, the memory plays a very important role. This book explains the entire operation process in more detail.

After talking about data storage, we come to data compression. Data compression is very common in our study and work. The book introduces the most common compression methods, analyzes their pros and cons, and then introduces Huffman coding.

Coming nextoperating systemRelated content, this part of the content is very critical and serves as a link between the past and the following. What is the role of an operating system? Why does application software not run properly under different operating systems? What is a virtual machine? Why introduce virtual machines? What is a JAVA virtual machine? BIOSWhat is it again? What important role does it play? This book has carried out detailed explanation and analysis.

What follows is the execution process of the program, from the source file we wrote to reading it into the memory?dynamic link libraryDLLWhat role does ( ) play? ( If you are interested, you can learn more about the static link library (LIB) )? How are library files merged with our code?

Next is the relationship between the operating system and the application. Applications run on the operating system, so how do applications interact with the operating system? At this time, system calls play a very important role.

passC languageIt is not possible to have a very deep and thorough understanding of the execution process of the program. In order to understand the underlying operating process, we must analyze its correspondingAssembly language, so the assembly language is introduced next.

Next, a very interesting question is, how does the application interact with the hardware? For example, keyboard, mouse, etc. This leads to a very interesting concept: system calls . QTIf you want to understand this idea in depth, you can learn and wait for the development framework yourself MFCand slowly experience it in actual projects. And the book also introduces DMAthat data can be transmitted between memory and peripherals without CPU intervention.
Insert image description here
The last chapter is quite interesting. Letting the computer "think" is quite similar to artificial intelligence. In fact, it means letting the computer simulate certain characteristics of the human brain to deal with practical problems. The book uses the example of guessing to explain this. Including the generation of random numbers, what are pseudo-random numbers, etc. Just watch the fun. Of course, this is not the current mainstream artificial intelligence implementation method.

3. Summary

All in all, this is a book that has bothhobbyandscientificreadings. This book provides a more in-depth explanation of the structure of the computer and the operation process of the computer language. It helps us to have a deep understanding of the relationship between computer software and hardware. It helps us to have a deep understanding of the hardware composition of the computer and its functions and relationships. Helps us understand the running process of computer programs.

I have seen many communities and Tieba criticize this kind of popular reading, and I feel that it will make readers' learning of relevant knowledge remain on the surface and unable to go deeper. However, I think it is better to read these books before chewing on thick classic books, both It has increased your interest and confidence in learning, and accumulated a certain amount of computer knowledge. Why not?

If you hurry up, you can finish reading it in about 10 days.

If I have time, I will continue to read the rest of the books in this series and share them again, so stay tuned. . .
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_43719763/article/details/131701640