The line Cheng of the definition in Java language (Thread) include entrance of a memory to nod an address, exit to order address and the code series that can implement orderly likewise. But the important distinction of process and line Cheng depends on line Cheng cannot be being carried out alone quite, it must move in the applied process process that is in mobile condition, the has intercurrent sex ordinal code that because this can define line Cheng,is program interior flows.
What Unix operating system and Microsoft Windows operating system support much user, much process is intercurrent carry out, and of the Cheng of many executive lines of interior of process of process of application of Java language support intercurrent carry out. The many logistic unit that the meaning of multi-line Cheng consists an application process are carried out OK and intercurrently. But multi-line Cheng does not mean many users process carrying out, the operating system also does not come to every line Cheng allocate independent systematic resource as independent course. The process can found his child process, child process and father process have different executable code and data memory space. And Cheng of the many lines in the process that is being used at delegate application process shares data memory space, but the executive warehouse that maintains every line Cheng to have independence and program carry out context (Context) .
Be based on afore-mentioned distinction, line Cheng also can call light-duty progress (Light Weight Process, LWP) . Task cooperation and data trade allow between diverse line Cheng, make use up in resource of all of computer science department etc the respect is very cheap.
Line Cheng needs the support of the operating system, the computer that is not all types supports multi-line Cheng to use a program. Moving environment of support of Cheng of language general line and language combines Java programming together, offerred much task to erupt simultaneously executive ability. This is just like a person to be in the process that handles chore, in putting the clothes washing machine put rice in electric rice cooker after automatic catharsis, begin to make food next. Wait for dish to had been done, the meal became ripe at the same time the dress also has been washed.
Those who need an attention is: In using a program use multi-line Cheng won't increase the data processing capacity of CPU. Perhaps be in the computer of much CPU only below network computation architecture, differentiate Java program for many intercurrent after executive line Cheng, start many lines Cheng to move at the same time, make different line Cheng moves in the Java fictitious machine that is based on different processor, ability raises those who use a program to carry out efficiency.
Additional, if apply a program to must await,the data such as database join takes in and send out in large quantities speed is relative when slower resource, process of multi-line Cheng application is very advantageous. Be based on the applied process of Internet to be necessary is multi-line Cheng type, for example, when the server end that should support a large number of client computer when development uses a program, the link that can establish applied program multi-line Cheng form to answer a client to carry requests, make every join user exclusive a client carries jumper Cheng. Such, user feeling server serves for join him user only, shortened thereby the client end of the server answers time.
Previous 1 23 4 5 6 7 8 Next