| 1 | = Project architecture = |
| 2 | |
| 3 | == 1. File system organization == |
| 4 | Kaya Phase 1 distribution is subdivided in several folders in order to |
| 5 | efficiently organize files and logically separate them into different sections. |
| 6 | Such division is thought for being ready to receive Phase 2 implementation |
| 7 | providing a well structured environment. |
| 8 | * `src/`: sources folder containing Phase 1 primitive functions source code, |
| 9 | as described below in paragraph 2; |
| 10 | * `test/`: testing folder, containing a debugging program (`p1test.c`), related |
| 11 | environment generated by the Makefile "`test`" target; this rule compiles, |
| 12 | links, creates uMPS executable and virtual devices and finally run it on the |
| 13 | uMPS virtual machine (see also README); |
| 14 | * `doc/`: documentation root containing various developers informations about |
| 15 | project internals; |
| 16 | * `include/`: library headers |
| 17 | * `*.e`: Phase 1 primitive functions interfaces: `pcb.e` and `st.e` |
| 18 | respectively relative to `pcb.c` and `st.c`; |
| 19 | * `*.h`: system constants and macro definitions (`const.h`), types and data |
| 20 | structures definitions (`types.h`); |
| 21 | * `lib/`: Phase 1 libraries objects files, ready for being linked. |
| 22 | |
| 23 | == 2. Source modules organization == |
| 24 | Following the evident logical division between two entities we have to |
| 25 | instantiate - processes and semaphores -, we opted for a two-modules subdivision: |
| 26 | * `pcb.c`: collects primitive functions for PCBs initialization/ allocation/ |
| 27 | deallocation, process queue/ tree maintenance; |
| 28 | * `st.c`: collects primitive functions for SD tree initialization and PCB |
| 29 | enqueueing to/dequeueing from semaphores. |
| 30 | |
| 31 | {{{ |
| 32 | * `check.c` contains an error check routine which is able to perform a simple type |
| 33 | check on the own data structures of Phase 1. |
| 34 | }}} |