-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add processes articles #8
base: main
Are you sure you want to change the base?
Conversation
… into c-articles
Updates from mid-July
…ng image and making citation a superscript
|
||
The easiest way thinking about the problem is to develop a system of **direct execution**, where when a process needs to run, the operating system gives full control of the CPU to that process, and the process executes and eventually gives control of the CPU back to the operating system. Under this scheme, the execution of a program on an operating system using a direct execution model would look like this: | ||
|
||
*svg goes here* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like there needs to be an svg file here :)
|
||
So, whenever a program needs to use a functionality outside of the ones it can directly access, it will make a **syscall**, requesting that the operating system perform some function for it. C programmers may already be familiar syscalls like `read()`, `write()`, `open()`, and `close()`.When a syscall is made, the program gives control of the CPU to the OS and the CPU switches to kernel mode. The OS will then execute the requested instruction, return to user mode, and switch back to the process: | ||
|
||
![img](../static/lde/lde-controlflow-diagram.svg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add diagram to git
|
||
The process of an OS choosing to take a process out of its running state is commonly referred to as **preemption**. To enforce preemption, modern CPUs implement a configurable timer that triggers a hardware **interrupt** at regular intervals. This interrupt traps control of the CPU back to the operating system, allowing the operating system to choose whether or not it wants to continue running that process or not: | ||
|
||
*gif goes here* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
Add architecture articles
Add binary article
Add virtual memory articles
removed mp0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lde.md : Overview and Switching CPU modes with syscalls have no images. Gif is not there in preemption
scheduling.md : Image for Fixed priority scheduling is missing
No description provided.