在单CPU单核处理器上可以进行多任务处理吗?

时间:2014-10-01 14:42:15

标签: multitasking

我可以很好地想象4个术语之间的区别:多任务处理,多处理,多道程序和多线程。只是希望进一步澄清这些段落之后提到的情况。

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 个答案:

答案 0 :(得分:0)

我的旧Windows 95计算机像你描述的那样进行多任务处理(至少从用户的角度来看),它只有1个核心。