The concept of thread-parallel computing, Computer Engineering

Assignment Help:

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.


Related Discussions:- The concept of thread-parallel computing

Illustrate working of pocket and pc-card modems, Q. Illustrate working of P...

Q. Illustrate working of Pocket and PC-Card Modems? Pocket Modems: Small external Modems used with notebook PCs.  PC-Card Modems:  PC and Modems are read with PCMCIA slots w

Economic argument for good design, One way of demonstrating the importance ...

One way of demonstrating the importance of good ID is by showing tangible benefits that can be talked about in cash terms. Within a business, good ID can lead to benefits such as h

Explain macro definition and call, Explain Macro definition and call. ...

Explain Macro definition and call. Macro: The assembly language programming frequently finds this necessary to repeat certain piece of code several times during the course of

What is base register addressing, Q. What is Base Register Addressing ? ...

Q. What is Base Register Addressing ? An addressing technique in which content of an instruction specifies base register is added to address field or displacement field of the

What is ai backgammon, This part looks at Berliner's program, two backprop ...

This part looks at Berliner's program, two backprop versions by Tesauro and a temporal difference process by Tesauro. This latter program is VERY good quality and has found strateg

Largest and the second largest number, The largest and the second largest n...

The largest and the second largest number from a set of n distinct numbers can be found in    O (n)

What is monitoring-and-surveillance agents, Q. What is monitoring-and-surve...

Q. What is monitoring-and-surveillance agents? ANSWER: Monitoring-and-surveillance agents or predictive agents are intelligent agents that examine and report on equipment.

What are the external storage systems, External storage systems A numb...

External storage systems A number of different types of external memory devices are available now. Some of these are considered below (hard drives haven't been mentioned as th

Responsibilities of objects, The Transaction object is responsible for read...

The Transaction object is responsible for reading the transaction file, finding the relevant account in the array of customers and applying the transaction. To find the relevant ac

Performance of pipelines with stalls, Performance of Pipelines with Stalls:...

Performance of Pipelines with Stalls: A stall is reason of the pipeline performance to degrade the ideal performance.                                             Average in

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd