Scheduler and Cluster of kThreads.
Cluster is an entity that contains multiple kernel threads (kThread). Each cluster is responsible for maintaining a ready queue and performing basic scheduling tasks. Programs can have as many Clusters as is necessary. The Cluster's ReadyQueue is a multiple-producer multiple-consumer queue where consumers are only kThreads belonging to that Cluster, and producers can be any running kThread. kThreads constantly push and pull uThreads to/from the ReadyQueue. Cluster is an interface between kThreads and the ReadyQueue, and also provides the means to group kThreads together.
Each Cluster has its own IOHandler. IOHandler is responsible for providing asynchronous nonblocking access to IO devices. For now each instance of an IOHandler has its own dedicated poller thread, which means each cluster has a dedicated IO poller thread when it is created. This might change in the future. Each uThread that requires access to IO uses the IOHandler to avoid blocking the kThread, if the device is ready for read or write, the uThread continues otherwise it blocks until it is ready, and the kThread execute another uThread from the ReadyQueue.
When the program starts a defaultCluster is created for the kernel thread that runs the main function. defaultCluster can be used like any other clusters.