A 17-year-old student self-study ``How the CPU runs the program'' and create a page to explain in detail
Lexi Matic, a 17-year-old engineer, has published a web page that explains the knowledge that he studied on his own about how the CPU, which can be said to be the brain of the computer, executes the program.
Putting the 'You' in CPU
Mr. Matic, who had doubts about 'what happens when the program is executed', began to study on his own, but could not find a site that explained in detail and adequately how the OS and CPU worked. is. So Mr. Matic
When executing a program on a PC, the CPU must execute instructions in order. However, the CPU processor cannot run multiple programs at once. Therefore, the kernel , which is the core of the OS, uses a timer to select tasks to be assigned to the processor from among many programs. As a result, the program sees itself running as a coherent, isolated unit within the CPU and proceeds.
When you boot your computer, the kernel starts the init program . The init program launches programs that render the computer's graphics environment and is then responsible for launching further software.
In order to start another program, we need to create a copy of the process using the '
The init program and the startup process of another program also check whether it is a process that has been copied using the fork system call. If it is identified as a copied process, it uses a system call called ' exec ' to ask the kernel to replace the currently running process with the new program.
The new replaced program is converted into an executable file format called ' Executable and Linkable Format (ELF)', and the kernel has information about how to load the program and where to place the code and data in the new virtual memory. Parse inside the ELF file to find The kernel may also convert ELF files properly if the program is fluidly linked.
The kernel can then load the program in virtual memory and return to userland , executing the filesystem and file manipulation commands necessary for the non-kernel OS to operate, while the program is still running. Become. 'This action sets the CPU's instruction pointer to the beginning of the code in the new program in virtual memory,' Matic said.
According to Mr. Matic, in order to create an accurate commentary page on the program and CPU, detailed research and refinement were repeated for three months. ChatGPT was used to create the commentary page, but Mr. Matic said, ``ChatGPT lied to me a lot and most of the information was not useful. ``If you are aware of the limitations of large-scale language models and know that AI generates wrong information, ChatGPT can work positively.''
Mr. Matic has been praised as 'a great learning resource that is accurately described.' Mr. Matic responded, 'Creating this commentary clarified my thought process and was very helpful in identifying the parts that I thought I understood at first but still did not understand.' reacting with
``I hope you enjoy reading this commentary, and I hope it will be an online resource where anyone can learn about CPUs and programs,'' said Matic.
Related Posts:
in Software, Posted by log1r_ut