diff --git a/docs/assets/images/only-processes.png b/docs/assets/images/only-processes.png new file mode 100644 index 0000000..1dc1763 Binary files /dev/null and b/docs/assets/images/only-processes.png differ diff --git a/docs/assets/images/processes-threads.png b/docs/assets/images/processes-threads.png new file mode 100644 index 0000000..b68bccb Binary files /dev/null and b/docs/assets/images/processes-threads.png differ diff --git a/docs/processes_overview.md b/docs/processes_overview.md new file mode 100644 index 0000000..6d9bd9a --- /dev/null +++ b/docs/processes_overview.md @@ -0,0 +1,30 @@ +# Overview of processes in MOP3 + +## What is a process? + +A process is a structure defined to represent an internal state of a user application's environment. This includes +the necessary stacks, code, data and other resources. A process (usually) has it's own address, but in certain +circumstances may share it with another process. + +## Only processes vs. processes-threads model + +### Overview + +MOP3 doesn't have a process-thread separation. Ususally in operating systems you'd have a "process", which consists +of multiple worker threads. For eg. a single-threaded application is a process, which consists of one worker. In MOP3 +we do things a little differently. We only have processes, but some processes may work within the same pool of (generally speaking) +"resources", such as a shared address space, shared memory allocations, mutexes and so on. An application then consists of +not threads, but processes, which are loosely tied together via shared data. + +#### Processes-threads model diagram +![Processes-threads model](assets/images/processes-threads.png) +#### Only processes model diagram +![Only processes model](assets/images/only-processes.png) + +## Scheduling + +MOP3 uses a round-robin based scheduler. For now priorities are left unimplemented, ie. every processes has +equal priority, but this may change in the future. + +A good explaination of round-robin scheduling can be found on the OSDev wiki: [the article](https://wiki.osdev.org/Scheduling_Algorithms#Round_Robin) + diff --git a/mkdocs.yml b/mkdocs.yml index 8da2cbb..e4029f1 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,7 +1,12 @@ site_name: MOP3 documentation theme: - name: readthedocs + name: material highlightjs: true repo_url: https://git.kamkow1lair.pl/kamkow1/mop3.git + +markdown_extensions: + - attr_list + - md_in_html + - pymdownx.blocks.caption