does blocked thread go to the ready queue?

if main thread is blocked by calling thread::join(), does blocked thread go to the ready queue?

OR

Is it guaranteed that the block will be released and executed immediately after the thread's execution ends?
It depends on what you mean by "immediately".

It's not as immediate as say a function return would be immediate, but the main thread is going to be marked ready pretty soon after the waited for thread exits.

It kinda depends on what else is going on in the system. It lots of processes and threads are already running at 100%, then an idler waiting for a thread to exit might be in for what seems like a long wait.

There are lots of knobs and levers to fiddle with.
https://man7.org/linux/man-pages/man3/pthread_setschedparam.3.html
https://man7.org/linux/man-pages/man7/sched.7.html


// salem c

Thank you! I got it!
Topic archived. No new replies allowed.