Threads are units of work that are created by a parent process to perform some task. By utilizing...

Click here to load reader

download Threads are units of work that are created by a parent process to perform some task. By utilizing multiple threads, an application can delegate the work.

of 6

Transcript of Threads are units of work that are created by a parent process to perform some task. By utilizing...

Multithreading

Multithreading in WindowsAnd implementation in C# : : Threads are units of work that are created by a parent process to perform some task. By utilizing multiple threads, an application can delegate the work to multiple workers to reduce the time it takes to complete a relatively long task.However, using threads just because you think they will make your application run faster can often backfire. In fact, using too many threads can actually cause your application to run slower. For example, you could have so many threads running that your application is spending more time swapping context between the threads than it is performing the tasks within the threads. In this case, your application will actually run slower than if it had no threading support whatsoever.The Basics of Threaded ProgrammingThread States: Life Cycle of a Thread

The Windows operating system supports a concept, called timeslicing, that enables threads of equal priority to share a processor.With timeslicing, each thread receives a brief burst of processor time, called a quantum, during which the thread can execute. At the completion of the quantum,even if the thread has not finished executing, the processor is taken away from that threadand given to the next thread of equal priority, if one is available.Thread Priorities and Thread Scheduling

Final : Display turn over threads in graphic modeResourceMicrosoft Visual C# 2005 Unleashed By KevinHoffman Deitel - C# How to Program (redistilled in one book)And special thanks to Barnamenevise forum