I have an assignment that consists of creating a user level thread package. I read through this thread, and it answered a lot of my questions. However, I am still confused about a few things...
Primarily, I cant understand how to actually create a user-level thread without the pthread library... I have a thread structure that takes into account the stack, the stack pointer, thread id, and the thread state. I'm guessing this is a simple task, but I cant wrap my mind around how a thread gets "created" in the current process.
Another question I have deals with how the thread gets passed to the scheduler. I have a round robin scheduler implemented, and a signal handler that handles an interrupt every 100ms to check for thread states. But how is the scheduler aware of the threads?
I feel like I am missing a concept of user-level threading that is preventing me from understanding thread creation and manipulation.
Please help me out! Thanks in advance!