The threads were used to increase the speed of running programs. They allow the computer to work seen like doing job on the same time. Actuary, the CPU just allocate the work time for each thread. When the threads are created or killed by system, the CPU will give the sources and time. If each task needs to create a thread for working, it will waste lots of sources and time. However, on the other way, we created a group of threads for jobs. Then we do not kill the thread. When a thread finishes a task, it will “sleep” in the queue. According to the scheduling algorithms of threads, the thread goes out of queue for the new task. It will re-use the threads and save the time and sources. So the “box” which we use to create, kills and manages the group of threads is thread pool.
Thread pool is managed by the system, so that programmers do not need to spend time taking or cart thread management. And they can concentrate on application tasks. The threads are stored by priority.
According to this project, the thread pool schedule algorithms will be known, and which schedule algorithms are suitable in games. The timing metrics will be used in the project.
A number of threads are created to perform a number of tasks, which are usually organized in a queue.The number of threads used is a parameter that can be tuned to provide the best performance. And there are many more tasks than threads.
After a group of threads are created in a queue. The results from the tasks being executed might also be placed in a queue. When a thread completes its task, it will request the next task from the queue until all tasks have been completed. The thread can be terminated, or sleep until there are new tasks available.
Then the number of tasks has been completed. The thread pool will delete the queue of threads and free the memory.
Name : Bowen Nong
Student ID : C00163585
Email : edward.nong@gmail.com
Supervisor : Joesph Kehoe
Course : Bsc (Honours) Software Development 2012/2013
Year : Final(4th)
The thread pool schedule algorithms will be known, and which schedule algorithms are suitable in games. The timing metrics will be used in the project.
The documents are stored in .docx format and are available to download for viewing and reference.