The concept of thread-parallel computing, Computer Engineering

The Concept of Thread

Thread is a chronological flow of control within a process. A process can include one or more threads. Threads have their own register values and program counter, but they are split the memory space and other resources of the procedure. Each process always starts with a single thread. Through the implementation of other threads may be produced as and when necessary. Like processes, each thread has an implementation state (ready, running, terminated or blocked). A thread has entrance to the memory address space and resources of its process. Threads have related life cycles as the processes do. A single processor system can maintain concurrency by switching implementation among two or more threads. A multi-processor system can hold parallel concurrency by executing a separate thread on each processor. There are three basic process in concurrent programming languages for terminating and creating threads:

Unsynchronised creation and termination:  In this method threads are terminated and created using library functions such as, START_PROCESS, CREATE_THREAD, CREATE_PROCESS and START_THREAD. As a effect of these function calls a new process or thread is produced and starts consecutively independent of its parents.

Unsynchronised creation and synchronized termination:  This method uses two instructions: JOIN and FORK. The FORK instruction creates a new thread or process. When the parent needs the child's(thread or process) result, it calls JOIN instruction. At this junction two threads (processes) are synchronised.

Synchronised creation and termination:  The most commonly system construct to implement synchronization is

COBEGIN...COEND. The threads among the COBEGIN...COEND construct are executed in similar. The termination of parent-child is suspended until all child threads are ended.

We can think of a thread as basically a inconsequential process. However, threads present some advantages over processes. The advantages of this are:

i) It takes very less time to terminate and create a new thread than to Terminate and Create a process. The reason being that a newly terminate thread uses the current process address space.

ii) It obtains less time to switch between two threads within the similar process, partly because the recently created thread uses the current process address space.

iii) Less communication overheads -- communicating between the threads of one process is easy because the threads share among former entities the address space. So, data produced by one thread is directly available to all the other threads.

Posted Date: 3/1/2013 4:20:05 AM | Location : United States

Related Discussions:- The concept of thread-parallel computing, Assignment Help, Ask Question on The concept of thread-parallel computing, Get Answer, Expert's Help, The concept of thread-parallel computing Discussions

Write discussion on The concept of thread-parallel computing
Your posts are moderated
Related Questions
If voice is converted to digital form using PCM, how many bits of data will be produced in half a second? While voice is converted to digital by using PCM that is Pulse Code Mo

Q. Why we need linker?  The linker: Joins assembled module in one executable program, Produces an .EXE module and initializes with special instructions to facilitate

Q. QWERTY - Keyboard Layout ? A keyboard layout is arrangement of keys across the keyboard. There is one keyboard layout which anybody who has worked on a standard keyboard or

Q. State any three properties of the neutrons. (i) A Neutrons are the constituent particles of all nuclei except hydrogen. (ii) As they are neutral particles they aren't de

Explain the characteristics of vector processing

Write an algorithm to outline the macro-expansion using macro-expansion counter. The flow of control throughout macro expansion can be implemented by using a MEC that is macro-

Electrically erasable programmable read only memory (EEPROM) An EEPROM is a special type of PROM which can be erased by exposing it to an electrical charge. Like other kinds of

What is the difference between = = = and = = ? output of "==" can be 1, 0 or X. output of "===" can only be 0 or 1. When you are comparing 2 nos using "==" and if one/bo

Why a computer expect to receive responses when it broadcast an ARP request? Response will be acquired only from the machine for that request is being sent not for the other ma

Truth table of NAND and NOR can be made from NOT (A AND B) and NOT (A OR B) correspondingly. Exclusive OR (XOR) is a special gate whose output is one only if two inputs aren't equa