I am learning about OS and here is what I get so far :
- a process is a program in execution
- a thread is the "unit" of execution of a process
a cool story I think my smol brain understands that part
- a thread is useful for "multiplying" tasks to do and this is mostly used when a task can "block" and we want other tasks to proceed
so here is my question:
- do threads run at the same time or is there a priority on how they are executed? for example how operating systems decide which process is to be "Active" at a time. do threads have similar behavior and if so is the order of threads active decided by the os or the process itself?
The next question is :
- do threads handle one task at a time or multiple task at a time or just a single task in general?