Home » Windows » The twentieth chapter multitasking and multithread...

The twentieth chapter multitasking and multithreading

is extracted from <Windows program (Fifth Edition, collector's Edition),.CHarles.Petzold, and >P923

refers to multi task operating system can run multiple parallel program . simple, operating system with a hardware clock for each allocation process running in parallel time. If the time slice is small enough, but extremely not because of running multiple programs and overload, so from a user's perspective. As if all programs are running at the same time.


task is not a new thing. In the mainframe, multi task early. These large machines are often a connection with hundreds of terminals, each terminal user should feel only during his visit to the whole machine. In addition, the mainframe operating system also allows users to "submit background tasks" the machine is in operation, the background of any user can also do some other things.

multi task on a personal computer has experienced a long time to become a reality . but now PC support multi tasking is behoove thing for us. Then I will talk about, even though the 16 Microsoft early Windows support multi task to a certain extent, but the function of Windows.32 is relatively limited support multi task real, but also additional support for multi-threaded.

multithreading refers to a program in its own internal also support multi task ability . program can put themselves into a plurality of execution threads, they seem to be running in parallel. This concept doesn't seem to be at the beginning of what, but in fact the program can use multiple threads to run it in the background long time task, and the user does not need to wait for a long time can not use the machine. Of course, this is sometimes not the people want to have an excuse to drink or to visit the refrigerator is good ah. But users should always have to work on the machine, even if the machine is busy doing other what.