Crate keos_project1

Crate keos_project1 

Source
Expand description

§Project 1: System Call

In Project 1, both user applications and the kernel run at the same privilege level. This is because the system does not yet support memory isolation; thus, there is no hardware-enforced boundary between user and kernel memory. In the next project, KeOS will introduce privilege separation, leveraging hardware features to isolate user space from the kernel, as is standard in modern operating systems.

This project builds the system call handling, which is the groundwork for secure and structured interaction between user applications and kernel services in subsequent stages of the system.

We are aware that you may not yet be familiar with the Rust language as well as KeOS apis, so this project is intended to be much easier than later projects. Please consult the Rust Book if you are unfamiliar with Rust and be familiar with Rust by solving exercises in Rustling. It is highly recommend to tring those exercises if this is your first project in Rust.

§Getting Started

To begin, navigate to the keos-project1/grader directory and run:

$ cargo run

Initially, KeOS will panic with a “not yet implemented” message, indicating the missing components that you need to implement.

§Modifiable Files

In this project, you can modify the following two files:

  • syscall.rs
  • file_struct.rs

When grading, other than theses two files are overwritten to the original one.

§Project Outline

Re-exports§

pub use process::Process;

Modules§

file_struct
File state of a process.
process
The process model for project1.
syscall
System call abi for x86_64.

Enums§

SyscallNumber
Represents system call numbers used in project1.