计算机专业毕业论文文献翻译资料附录一Compared to multi-threaded operating system, means is that it can run a program withthe ability of different parts; each part of the implementation was as a thread. Therefore, in the preparation of applications, we have very good design in order to avoid the implementation of the different threads of mutual interference. Which will help us to design robust procedures, we can make at any time when necessary to add the thread.Thread can be described as a micro-process; it has a starting point for theimplementation of the order of series and a destination. It is responsible for the maintenance of its own stack, the stack for exception handling, priority scheduling and a number of other threading systems re-implementation of the information needed. From this concept, it seems there is no thread with the process of distinction, in fact, thread and process is certainly different: the process of a complete independence to have their own memory space and data, but the same thread within a process is shared memory space and data. Corresponds to a process for some procedures, it is by the same procedure in which an independent threads running at the same time the composition. Thread is sometimes referred to as parallel program running on lightweight processes, threads are lightweight processes called because it is dependent on the operationand process the context of the environment, and the process of using resources. In a process, the threads are preemptive scheduling or non-preemptive model. In seizing the model, the operating system responsible for the allocation of CPU time for each process, once the current process used to finish the distribution of CPU time, the next operating system will determine the CPU time is occupied by a single thread. Thus the operating system will periodically interrupt the current thread is running, the allocation will be cup to the next in the queue waiting for a thread.Therefore, a thread can not be any exclusive CPU. Occupied by each thread CPU timedepends on the process and the operating system. Process assigned to each thread a short period of time that we feel all the threads are executed at the same time. In fact, the system time for each process, 2 ms, and then scheduling other threads. It the same time, he maintainedall the threads and circulation, the distribution of small amount of CPU time tothe thread. Thread switching and scheduling is so fast that the feeling is that all the threadsare executed simultaneously.What does scheduling mean? Scheduling processor storage means to be implemented by the end of the process of CPU time for the state and a future time loading the state of theprocess to resume its operation. In this way, however there are deficiencies, one thread at any given time interruption of the implementation of a thread. Suppose a thread is a document does write operation, and another thread interrupts its operation, also the same documents dowrite operation. Windows 95/NT, UNIX is used in such a way thread scheduling.In non-preemptive scheduling model, each thread may need to occupy much time CPU time CPU. Scheduling in this way, it may be a very long execution time makes all the otherthreads need to thread CPU "starving to death." In the processor is idle, that is, when theprocess does not use CPU, the system can allow the process of temporarily using other CPU.CPU occupation CPU thread has the power to control the release of only its own initiative, CPU; other threads can use the CPU. Some I / O and Windows 3.x is the use of thisscheduling strategy.In some operating systems inside, which will use two scheduling strategy. Non-preemptive scheduling strategy of running in the thread priority when used in general,and for high-priority scheduling of threads is the use of preemptive scheduling strategy. Ifyou are unsure about the kind of system is that scheduling strategy, assuming that thescheduling strategy can not be seized is relatively safe to use.Application in the design, we believe that those who occupy a relatively large number of CPU time for a certain interval thread will release the control of the CPU, this time thesystem will check the queue of those waiting inside the thread currently running with thesame priority level or higher priority threads, and thread to use these CPU. If you find such a system of thread, immediately suspend the currently executing thread and activate the threadsatisfy certain conditions. If you do not find the same or higher- priority thread, the currentthread has also continued to occupy CPU.When the thread is running CPU would like to release control to a low priority thread, the current thread into sleep state to allow low- priority threads hold the CPU.In a multi-processor system, the operating system will these independent threadsallocated to the different processor implementation, this willgreatly speed up the process of running. The implementation of the efficiency of the thread will be greatly improved,because the threads of time-sharing a single processor into adistributed multi-processor implementation. This multi-processor in the three-dimensional modeling and graphicsprocessing is very useful.Do you need to multi-threaded? We sent a print order requesting the printer to print tasks, assuming that this time in response to the computer and the printer stopped working also, would it mean that we do things to stop waiting for this slow on the printer? Fortunately, this situation does not occur, we work in the printer can also listen to music or drawing.Because we use a separate threads to perform these tasks. May you have multiple users 'simultaneous access to a database or web server was surprised at how they work? This isbecause for each connected to a database or web server user set up an independent thread to maintain the status of the user.If a program is running a certain degree of order, this time in this way problem may arise, and even lead to the collapse of the entire process. If the program can be divided into different independent tasks, the use of multi-threaded, even if a certain part of the task failed, on the other would not be affected, will not lead to the collapse of the entire process. There is no doubt that the procedures for the preparation of multi-threaded tool makes you a slave to drive the process of non-multi-threaded, multi-threaded but may also become a burden orcost need not be small. If the improper use of it will bring more of the disadvantages.If a program has a lot of threads, then the thread is bound to other programs can only take up less CPU time; and a lot of CPU time is usedfor thread scheduling; operating system also requires sufficient memory space to maintain each thread context information; therefore, a large number of threads will reduce the efficiency of system operation. Therefore, if the use of multi-threaded, then the multi-threaded program must be designed well, otherwise thebenefits will be far less than the disadvantages. The use of multi-threaded so we must be careful to deal with these threads of the creation, scheduling and work release.There are many ways to design multi-threaded applications. As shownin the back of the article, I will give detailed examples of programming, through these examples; you will be able to better understand the multi-threaded. Threads can have different priorities, forexamples, in our applications there, or do a lot of graphics rendering operations at the same time to accept user input, it is clear the user's input needs to be the first time to respond to, and Rendering or you need a lot of computing time, the suspension is not the problem, so users will need to enter the thread of high-class leisure, andgraphics rendering, or low priority operation can be. Independent of each otherbetween these threads.In the above example, graphics rendering, or a lot of computing is clearly need to stopusing a lot of CPU time, during this period of time, the user waiting for them there is no need to re-input information is completed, we will process designed to separate the two threads, one for the user's input, those responsible for dealing with a very long time-consuming task. This will make the procedure more flexible and can quickly respond. At the same time, users can also run any time the possibility of the abolition of the task. Drawing graphics in this case, the procedure should always be made to the system responsible for receiving the news. If the procedures are busy on a mission, there may result into a blank screen, which is obviously the need for our procedures to deal with such incidents. So I have to have a thread to deal with these sources is responsible for, as I said earlier should be the trigger of the work of re-drawing the screen.We should grasp the principle of time-for those who need to compare the urgency of thetask immediately, we are due to the high priority given the other priorities of the threads should be lower than her priority. Client requests listener thread should always be high priority, for a user interaction with the task of the user interface; it needs to be the first time responses, and its priority because ofthe high-priority.附录二多线程相对于操作系统而言 , 指的是可以同时执行同一个程序的不同部分的能力,每个执行的部分被成为线程。