docs: created some ascii art schematics for processing architecture

This commit is contained in:
antifallobst 2023-03-04 00:43:15 +01:00
parent 854bef0d4e
commit 5787858704
1 changed files with 53 additions and 0 deletions

View File

@ -1087,6 +1087,59 @@ This function fills all the interrupt gates (handlers) into the IDT and loads it
## proc
The general processing structure is a bit more complex,
so I've split the schematics into multiple parts.
Processes Schematic:
```
+----------------+
| Kernel Process | <----+
| [Threads] | |
+----------------+ |
| [Parent]
[Childs] |
| +--------+--------+
v / \
+-----------+ +-----------+
| Process 1 | --[Next]-> | Process 2 |
| [Threads] | <-[Prev]-- | [Threads] | . . .
+-----------+ +-----------+
| |
[Childs] [Childs]
| |
v v
. . . . . .
```
Thread Schematics (processes view):
```
+---------+
| Process | <-------+
+---------+ |
| [Process]
[Threads] |
| +--------+--------+
v / \
+----------+ +----------+
| Thread 1 | --[LocalNext]-> | Thread 2 |
| | <-[LocalPrev]-- | | . . .
+----------+ +----------+
```
Thread schematics (schedulers view):
```
[RunningThread]
|
v
+----------+ +----------+ +----------+
+---> | Thread 1 | --[GlobalNext]-> | Thread 2 | --[GlobalNext]-> | Thread 3 | . . . ----+
| +-- | | <-[GlobalPrev]-- | | <-[GlobalPrev]-- | | . . . <-+ |
| | +----------+ +----------+ +----------+ | |
| | | |
| +------------------------------------[GlobalPrev]------------------------------------+ |
+--------------------------------------[GlobalNext]--------------------------------------+
```
### thread.h
#### `thread_T` - struct