Add command task execution and improve command documentation
Introduced a new CommandTaskContext structure to facilitate command execution in separate tasks. Updated the execute_command function to spawn tasks for commands, enhancing concurrency. Improved documentation for the 'memtest' and 'tasktest' commands in README.md to clarify their functionality and usage. Updated the interactive prompt reference to 'starling>'.
This commit is contained in:
17
README.md
17
README.md
@@ -104,7 +104,7 @@ The loader expects `kernel.elf` at the root of the EFI partition (next to the `E
|
||||
|
||||
### Shell Commands
|
||||
|
||||
Once the OS boots, an interactive prompt (`->`) is displayed. The following commands are available:
|
||||
Once the OS boots, the Starling Terminal displays an interactive prompt (`starling>`). The following built-in commands are available:
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
@@ -115,10 +115,17 @@ Once the OS boots, an interactive prompt (`->`) is displayed. The following comm
|
||||
| `about` | Display system information |
|
||||
| `mem` | Display memory statistics (PMM, heap, paging) |
|
||||
| `ps` | List all active tasks with PID, state, and name |
|
||||
| `spawn [name]` | Create a demo background task |
|
||||
| `memtest` | Run memory allocation/deallocation tests |
|
||||
| `spawn [name]` | Create a demo background task (optional argument sets the task name) |
|
||||
| `memtest` | Run memory allocation/deallocation and PMM tests |
|
||||
| `tasktest` | Spawn multiple concurrent tasks to test the scheduler |
|
||||
|
||||
In addition, the Starling Terminal itself recognises:
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `starling` | Spawn a nested Starling Terminal at increased depth |
|
||||
| `exit` | Exit the current nested Starling Terminal (not allowed at depth 0) |
|
||||
|
||||
### Example Session
|
||||
|
||||
```
|
||||
@@ -185,8 +192,8 @@ UEFI Firmware
|
||||
└─ kmain(&Boot) [kernel.c] jump to kernel
|
||||
├─ idt_init() install exception handlers
|
||||
├─ memory_init() PMM → paging → heap
|
||||
├─ task_init() scheduler + task 0
|
||||
└─ shell loop read-eval-print with cooperative yield
|
||||
├─ task_init() scheduler + task 0
|
||||
└─ Starling Terminal task interactive read-eval-print loop
|
||||
```
|
||||
|
||||
### Memory Management
|
||||
|
||||
Reference in New Issue
Block a user