2014-10-01 117 views
-1

我可以很好地想象4個術語之間的區別:多任務,多處理,多程序和多線程。只是希望進一步澄清這些段落之後提到的情況。單CPU單核處理器可以執行多任務嗎?

Multitasking does not necessarily mean that multiple tasks are executing at exactly the same 
instant. In other words, multitasking does not imply parallelism, but it does mean that more than 
one task can be part-way through execution at the same time, and more than one task is advancing 
over a given period of time. 

In the case of a computer with a single CPU, only one task is said to be running at any point in 
time, meaning that the CPU is actively executing instructions for that task. Multitasking solves 
the problem by scheduling which task may be the one running at any given time, and when another 
waiting task gets a turn. The act of reassigning a CPU from one task to another one is called a 
context switch. When context switches occur frequently enough, the illusion of parallelism is 
achieved. 

Now, lets say that at time t=0 , i started listening songs by opening them in VLC player and this 
will be continued for exactly 60 mins. At t=15 mins, i opened my Windows media player to watch a 
Charlie Chaplin show and this will last for another 60 mins(i mean this will be finished exactly 
when t = 75mins). So we see that the time interval of 45 mins in between was common for both of 
them. Ofcourse, it's multitasking. But as i said 'multitasking does not imply parallelism', so 
was the context switching b/w the 2 fast enough to give the impression of parallelism(I mean i 
could hardly notice any delay in their execution).And does one of the tasks pause for few 
nanoseconds if i guess. My laptop's configuration is i3 processor, Win8, 4GB RAM. 
Secondly, is multitasking possible on a single CPU single core processor. If yes, how does the 
computer achieves it. 
+1

您是否有真正的問題?如果沒有,這是相當無關緊要的...... – twalberg 2014-10-01 15:58:53

回答

0

我的舊的Windows 95的計算機沒有多任務像你描述的(至少但從用戶的角度),它只有1個核心。

相關問題