Training
×

Thread States

INtime is designed according to the asymmetric multiprocessor (AMP) model. With INtime, each core or hyper-thread is referred to as a “hardware thread”, a hardware entity which reads and executes instructions. In contrast, “thread” will refer to software threads if not explicitly stated differently.
Every “hardware thread” will run an individual instance of INtime. INtime does not migrate threads between “hardware thread”, instead SW threads are locked to the “hardware thread” they have been created on. SW threads are in one of five states:
Running: only one thread can be executing at any given time in a “hardware thread”. This thread is called the running thread; it is always the best priority thread of the ready list.
Asleep: when a thread is waiting for an event to occur, it is in the asleep state.
Ready: a thread that has all the resources it requires to run but is not running is in the ready state. A thread goes from Ready to Running when it is the best priority thread in the Ready state, and it is of a better priority than the Running thread.
Suspended: a thread that is in the suspended state does not consume any CPU resources. It must be resumed by another thread. Associated with each thread is a suspension depth which has a maximum value of 255. If you try to suspend a thread more than 255 times, you will receive an E_LIMIT exception code. If an attempt is made to resume a thread which has not been suspended, an E_STATE exception code will be generated.
Asleep-Suspended: a thread that is Asleep when it is suspended enters this state when the running thread suspends the sleeping thread. If its event occurs or its sleep time expires before it is resumed, it will enter the Suspended state. If it is resumed before it awakens, it will return to the Asleep state.