The project is to implement a user level thread package. The package supports yield(), semaphor mechanism, and various scheduling policy. The first portion of the project is to implement yield() for a user level thread to yield to another user level thread. Note yield() is not a system call nor a kernel function, it is purely a function in user space. To save and restore context, we have to write assembly codes, or maybe call a system call. A user level thread is created, deleted, managed, and scheduled by the user process itself. We will have to call system call set jmp and long jmp to snapshot the current contexts. Actually we should be able to use similar trick that we used in yield() to implement set jmp and long jmp function by writing assembly code.
Fork, Process, Thread :