Reputation: 115
Kindly, help me understand the following 'thread' concepts:
If concurrently running threads are part of a running process, how is time slice divided between multiple threads of a same process?
Also, since there is no new Process Control Clock created, how do they get their share of CPU allocation? Is it like, dispatcher lets TCB access CPU?
Upvotes: 1
Views: 1959
Reputation: 17668
That's operating system scheduling job. The OS has a thread pool of active threads, it implements scheduling algorithm to make sure each thread is given amount of CPU time to run. For example Linux uses Completely Fair Scheduling
Upvotes: 1