Previous | Next --- Slide 23 of 116
Back to Lecture Thumbnails
gmukobi

Kayvon said, "It is the responsibility of the operating system to choose which threads to run each processor on. Sometimes, the OS will tell a processor to stop working on a certain thread, context switch to another thread, and continue the work on that new thread. The OS chooses which N threads to run on the N cores of your system at any point in time."

kayvonf

That is correct. Currently on my laptop there are hundreds of live threads. OSX is deciding which of those hundred are assigned to my CPU's eight execution contexts and thus are actually running on the CPU.

Periodically the operating system will perform context switches that change which OS threads are assigned to the available hardware execution contexts.

Please log in to leave a comment.