multithreading - Why not use a full list of runnable threads, as opposed to just threads that are runnable but not running? -


i'm considering concepts behind multiprocessing, , i'm trying come reason why ready list used contains runnable threads aren't running, opposed list of runnable threads head of data structure being running thread(s)?

thanks opinions.

edit: let me clarify. far know, thread packages use ready list identify processes ready run, while running process identified separate variable. why don't include running processes in ready list data structure running thread @ head of structure, making thread package inclusive. multiprocessing cause problems in design scheme?

because thread can run on 1 processor (core) @ time. list (queue, really) of threads ready run used scheduler when it's looking thread should run; if thread running on 1 cpu, can't run on cpu @ same time, scheduler not want @ (at time -- sometime later when it's not running , eligible run again, care again...)


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -