Joke Collection Website - Mood Talk - Is there only one thread executing in the CPU at the same time, is it dual-core or multi-core and multi-thread?

Is there only one thread executing in the CPU at the same time, is it dual-core or multi-core and multi-thread?

Hehe, the CPU can only execute one thread at a certain time, but multithreading is not called multithreading because it is multi-core or dual-core. Because when multiple threads execute in parallel, the CPU will switch threads frequently according to a certain thread scheduling algorithm. When an executing thread needs IO operation or memory access, the CPU can completely abandon the thread and schedule other threads on the thread ready queue, and the abandoned thread will enter a blocking state. After the IO operation or memory access operation is completed, the thread can enter the thread ready queue.

People usually refer to multithreading, because the CPU switches threads according to a certain thread scheduling algorithm, so in a period of time, many threads can be seen executing concurrently. In fact, only one thread is running at a certain point in time.