Multithreading
Multithreading is not a new concept in software development. Before looking into how multithreading is implemented in .NET, let us have a brief look at what threads are and why they are important.
What are threads?
A thread can be defined as a sequence path of execution for a program. Multithreaded program contain two or more parts that can run concurrently. Each part of such a program is called a Thread.
Let us have a brief look at one of the important concept called Time Sharing. A computer System can give an expression that several thing r done simultaneously by running each process for a few milliseconds, then saving it state and switching over to the next process and so on. Threads simply extent that concept from switching between several different programs to switching between several different functions executing simultaneously within a single program. A thread in not restricted just to one function. Any thread in a multithreaded program can call any series of methods that could be called in a single threaded program.
When and operating System switches from running one process to running another process for its time slice, there is quite costly over head of saving the program's state. When the system switches from running one of our thread to running another of our threads, a lot over ahead context switch within the same address space is done. Threads can actually achieve the counterintuitive result of making a program run faster, even on uniprocessor hardware. This occur when there are calculation steps that no longer have to wait for the out put to complete, but can run while the I/O is taking place.
George FederPosted Jan 30, 2008, 5:31 PM
I want to talk to a ZigBee tranceiver via a USB port. I have no problem setting up the USB port. The problem that I have is after writing to the port I than try to read the port at which time the program hangs up. I am using Visual Studio 2005 with C# as the language. What suggestions do you have to solve this problem? Thank you George000