Quantcast
Channel: Active questions tagged operating-system+scheduling - Stack Overflow
Viewing all articles
Browse latest Browse all 211

What is the difference in scheduling threads?

$
0
0

I am currently learning about simultaneous multi-threading, multi-core and multi-processor scheduling of threads. I checked some information, my understanding is:

If there is a processor that supports simultaneous multi-threading, it turns one physical core into two logical cores. There are two processes, P1 and P2.

  1. My understanding: In Linux, each process is composed of at least one thread? So scheduling is based on thread scheduling?

P1 and P2 are respectively scheduled to two logical cores. They operate independently. This is the first situation. If there is a process P3, it consists of two threads t1 and t2. Schedule t1 and t2 to different logical cores respectively. So what is the difference between scheduling two different processes to separate logical cores and scheduling different threads in the same process to logical cores?

  1. My understanding: The process is the smallest unit of the system toallocate resources, and threads share the resources of the process.Threads in a process share virtual memory, PCB, and can access thesame data. Therefore, when scheduling different threads in a processand scheduling threads in different processes, there is no differencefor the processor. The difference lies in the address translation ofthe page table and whether the cache can be shared. For a multi-coreprocessor, the processor does not care whether the threads belong tothe same process. The consistency of the data is guaranteed by MESI.The physical location of the data is guaranteed by the page table.

Is my understanding correct?


Viewing all articles
Browse latest Browse all 211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>