A simple operating system that can run on x86-64 multi-core processors.
This is my homework done in the operating system experiment course. Since the class only talks about operating system design on a 32-bit single-core CPU, and I am more interested in operating systems running on multi-core processors, I chose to write an operating system on an x64 symmetric multi-processor.
Developed using Ubuntu 16.04. Installation dependencies:
apt install make gcc gdb qemu
run
make qemu

Provides a process/thread API for applications, supporting processes/thread creation, waiting, canceling, sleeping and other operations.
Implements the memory copy-on-write technology during process creation.
Avoid race conditions when multiple CPUs execute instructions through appropriate synchronous mutex mechanisms.
Use LAPIC/IOAPIC to realize the startup and interrupt control of multi-core CPUs.
Store variables related to a specific CPU through thread_local variables.
| serial number | name |
|---|---|
| 0 | fork |
| 1 | exit |
| 2 | thread_create |
| 3 | thread_exit |
| 4 | wait_process |
| 5 | wait_thread |
| 6 | get_pid |
| 7 | get_tid |
| 8 | kill_process |
| 9 | kill_thread |
| 10 | sleep |
| 11 | open |
| 12 | Close |
| 13 | read |
| 14 | Write |
| 15 | unlink |
| 16 | readdir |
| 17 | stat |
| 18 | mkdir |
| 19 | rmdir |
| 20 | lseek |
| twenty one | exec |
Implement signal mechanism.
Implement support for a commonly used file system.
TCP/IP protocol stack.