This PR adds all the guides from [Visual Guides](https://bytebytego.com/guides/) section on bytebytego to the repository with proper links. - [x] Markdown files for guides and categories are placed inside `data/guides` and `data/categories` - [x] Guide links in readme are auto-generated using `scripts/readme.ts`. Everytime you run the script `npm run update-readme`, it reads the categories and guides from the above mentioned folders, generate production links for guides and categories and populate the table of content in the readme. This ensures that any future guides and categories will automatically get added to the readme. - [x] Sorting inside the readme matches the actual category and guides sorting on production
1.9 KiB
title, description, image, createdAt, draft, categories, tags
| title | description | image | createdAt | draft | categories | tags | |||
|---|---|---|---|---|---|---|---|---|---|
| How Do Computer Programs Run? | Explore the execution flow of computer programs from start to finish. | https://assets.bytebytego.com/diagrams/0218-how-do-computer-programs-run.png | 2024-03-10 | false |
|
|
The diagram shows the steps.
User Interaction and Command Initiation
By double-clicking a program, a user is instructing the operating system to launch an application via the graphical user interface.
Program Preloading
Once the execution request has been initiated, the operating system first retrieves the program's executable file.
The operating system locates this file through the file system and loads it into memory in preparation for execution.
Dependency Resolution and Loading
Most modern applications rely on a number of shared libraries, such as dynamic link libraries (DLLs).
Allocating Memory Space
The operating system is responsible for allocating space in memory.
Initializing the Runtime Environment
After allocating memory, the operating system and execution environment (e.g., Java's JVM or the .NET Framework) will initialize various resources needed to run the program.
System Calls and Resource Management
The entry point of a program (usually a function named main) is called to begin execution of the code written by the programmer.
Von Neumann Architecture
In the Von Neumann architecture, the CPU executes instructions stored in memory.
Program Termination
Eventually, when the program has completed its task, or the user actively terminates the application, the program will begin a cleanup phase. This includes closing open file descriptors, freeing up network resources, and returning memory to the system.
