|
| 1 | +# Pech |
| 2 | +A complete rework of the PearKernel. |
| 3 | + |
| 4 | +Of course, a main.py is already written for you to make it easier to understand what's going on. |
| 5 | + |
| 6 | +I highly recommend reading up on IPC (real "adult" pipes, not those mailbox-style ones). |
| 7 | + |
| 8 | +By checking out the FS server source code, the main.py file, and reading about Mach 3.0, you’ll be able to dive right in. |
| 9 | + |
| 10 | +# Why am I so sure? |
| 11 | +Simple: the Pech kernel doesn't have things like "61 system calls." |
| 12 | + |
| 13 | +Everything is crystal clear: |
| 14 | + |
| 15 | +Want to read a file? Send a message to the FS server. |
| 16 | + |
| 17 | +Here is what an FS message looks like: |
| 18 | + |
| 19 | +{"client_pid": <your pid>, "reply_pipe": <pipe id for the response>, "cmd": <command>, |
| 20 | + |
| 21 | +"path": <any vfs path (recommended to read files.txt)>, "data": <data to write, only for 'write' command>, |
| 22 | + |
| 23 | +"permissions": <permissions (see below), only for 'mkdir' and 'write'>} |
| 24 | + |
| 25 | +# Kernel Concepts |
| 26 | +Here they are: |
| 27 | +* The Kernel is a Process Assistant: It should only help get the work done, not do the work for the process. |
| 28 | +* Security and Stability Above All: The kernel must prevent a process from doing anything malicious by any means necessary. |
| 29 | +* Zero Tolerance for Risk: Anything that compromises security (e.g., dangerous libraries) must be nullified. |
| 30 | +* Servers provide Safety: Servers allow processes to perform operations more securely. |
| 31 | +* IPC is Everything: IPC is the best thing ever invented. Any kernel version without IPC cannot be considered "Pech-like." |
| 32 | +* Dynamic Programs are Vital: Without them, the VFS can be considered worthless. |
| 33 | +* VFS is its own thing: VFS is not just a controller for physical filesystems. It is a separate filesystem with its own files. |
| 34 | +* Everything in its Place: No redundant "utility" files with 600 lines of code. |
| 35 | + |
| 36 | +# Permissions |
| 37 | +A lightweight permission structure: |
| 38 | + |
| 39 | +For files: |
| 40 | + |
| 41 | +* r or nr (Read / No Read) |
| 42 | +* w or nw (Write / No Write) |
| 43 | +* d or cd (Delete / Cannot Delete) |
| 44 | + |
| 45 | +Note: Changing permissions is currently not supported. |
| 46 | + |
| 47 | +For folders: |
| 48 | + |
| 49 | +Only d or cd. |
| 50 | + |
| 51 | +# Support |
| 52 | +Here is my Gmail: |
| 53 | + |
| 54 | +dimasoft976@gmail.com |
| 55 | + |
| 56 | +Feel free to write whatever you want there. |
| 57 | + |
| 58 | +Happy developing! |
0 commit comments