2014-10-01 128 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个核心。

相关问题