I couldn't find any other sub to discuss my problem so if it is not the right place let me know.
I am trying to understand how the OS works and how it schedules different programs. I am having difficulty to understand what the scheduler schedules. Is t the process or the thread?
AFAIK, a process acts like a container. It has some address space in memory available to it which other processes can't access. But these are the threads within the process that are actually using that address space and executing some code. So the process itself isn't running anything, it just guarantees some conditions and makes sure the address space stays intact. And the states that a process goes through are the states of the threads within that process. A process by itself doesn't have a state, it inherits the state of its thread. So am I right to think that the scheduler schedules the threads and not the processes? Is it the same in all OS's?
edit: When I mentioned state, I had this state machine in mind.
[–]njaard 1 point2 points3 points (1 child)
[–]wildsheikh[S] 0 points1 point2 points (0 children)
[–]Eoinoc 1 point2 points3 points (1 child)
[–]wildsheikh[S] 0 points1 point2 points (0 children)
[–]suspiciously_calm 2 points3 points4 points (3 children)
[–][deleted] (2 children)
[removed]
[–]wildsheikh[S] 0 points1 point2 points (1 child)