Contents
Mouse Driver: Allows for packets generated from moving and pressing the mouse to be recognized and responded to by the kernel. Works with text scrolling.
Simple GUI: Uses the mouse location on the terminal to run executables.
Auto-Complete on Tab: When tab is pressed and at least two characters have been inputted that match an executable, terminal will auto-complete file name.
Command History: Will remember last command inputted on current terminal and will add to buffer on up-arrow press. Works on terminals independently.
Color: Able to change color of background and text of current terminal.
Paint: A fun program that allows for user to color screen. Shows cursor and right click changes current color.
Status Bar: In GUI shows welcome message and on executables displays unique text. In terminal shows pid, name of executable running, and current terminal.
Command | Description |
---|---|
exit | Quit the current shell program. Will try to restart if the last shell in the current terminal is terminated. |
clear | Clears current terminal screen. |
color | Choose font and background color of current terminal screen. |
[Executable] [Arg] | Search and open the program in the current terminal. Some program may require arguments (see below). |
Combination | Action | Description |
---|---|---|
Alt+F1 | Switch to Terminal 1 | (See below) |
Alt+F2 | Switch to Terminal 2 | (See below) |
Alt+F3 | Switch to Terminal 3 | (See below) |
Ctrl+L | Clear Screen | Clear the VRAM and reset the cursor. |
File Name | File Kind | Description |
---|---|---|
. | Directory | Holds information and refers to the directory itself. |
sigtest | Executable | Argument: 0 or any. Used to test signals. Use arg 0 to generate a PF without handler installed. |
shell | Executable | Executes a new shell. The underlying program running in each terminal. |
grep | Executable | Argument: a pattern. Prints lines that contain a match for the pattern. |
syserr | Executable | Used to test illegal user program arguments. |
rtc | Device | Giving user-level access to the real-time clock (RTC). |
fish | Executable | Used to test vidmap and RTC. Display a fish animation in the current terminal. |
counter | Executable | A numerical counter. |
pingpong | Executable | Used to test RTC. Infinitely print a ping-pong animation in the current terminal. |
cat | Executable | Argument: a file name. Open and read the content of a file/directory/device. |
frame0.txt | Regular File | The fist frame of fish animation. |
verylarge~.txt | Regular File | Used to test very long file name handling. |
ls | Executable | List the directory. |
testprint | Executable | Used to test the terminal driver. |
created.txt | Regular File | Author information left by ECE 391 staff. |
frame1.txt | Regular File | The second frame of fish animation. |
hello | Executable | Used to test the terminal driver (input buffer). |
Whenever there is a trap, processor jumps to the assmebly linkage from the IDT.
Assembly linkages for interruption, exception, and system calls are different, but they all construct a hardware context for furture restoring or usage.
They will also push/pass through arguments accordingly, and call the corresponding handlers.
Linkage pushes information and calls an unified exception handler.
Linkage pushes information and calls an unified interrupt handler.
Then the handler will dispatch to the corresponding drivers.
The IRQ lines are managed by two i8259 PICs just like any other classic IBM-compatible PC.
Contains drivers for the standard keyboard, programmable interval timer (PIT), real-time clock (RTC), and terminal.
The standard keyboard driver adds support for capital letter handling and combinational keys.
The PIT driver is used to handle the scheduling and can be turned off (see below).
The RTC driver supports frenquency adjusting and is "virtualized," so each process has its own RTC instance (see below).
The terminal driver is for standard input and output and works with keyboard driver. The input buffer is limited at 128-characters.
The OS bypasses segmentation just like any modern operation systems, only paging was used for memory addressing.
The memory layout is fixed (see below).
From low to high, 32MB of physical memory is utilized:
From low to high, the following in the 4GB virtual memory space is utilized:
The File System has a total size of 8MB, and is divided into 4KB blocks of one boot block, inodes, and data blocks.
Each boot block can track up to 62 inodes and one root directory, and each inode can track up to 1023 data blocks.
The limitations are up to 62 files of 4092KB size and 32 characters name length. Also, it does not support hierarchy and is read-only.
The OS treats any files, device (RTC), and directory as files. Each process has a dynamic file descriptor (FD) that supports 8 open files.
According to the file type, each entry tracks inode, position, flags, and an operation jump table, and is utilized by syscalls (see below).
System Call | Description |
---|---|
halt | Halt the current program (process). |
execute | Load and execute a new program. |
read | Read data from a opened file (see file system abstraction above). |
write | Write data to a file (support terminal and device/RTC only). |
open | Allocate FD entry and open a file. |
close | Close the FD entry and close a file. |
getargs | Read the command line argument from shell. |
vidmap | Giving user-level access to the VRAM and map it to the user space. |
set_handler | Set custom handler for signal. |
sigreturn | Restore the hardware context from signal handler. |
Please note that the last two system calls are not implimented as signals are not present.
Supports up to 6 processes. Each process holds a process control block (PCB) in the kernel.
The kernel manages the PCB allocation by a custom design called PCB_t.
Each PCB tracks the allocated process ID (PID), parent PID, terminal ID, kernel/user stacks, FD, etc.
Supports up to 3 terminals. Each terminal is independent of the others.
Supports a round-robin scheduler through sequential PIT interrupts.
The scheduler schedules 3 processes that is shown on each terminal, called active processes, so they can multitask.
But only one process is "actually" running, called running process.