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

Give the example of spreadsheet, Give the example of Spreadsheet By sel...

Give the example of Spreadsheet By selecting cell C1 and dragging the formula down to C5 the below formulae will be replicated in C2 to C5: (A2*B2), (A3*B3), (A4*B4) and (A5*B5

Creating a function, I''m suppose to create a function called calc_rectang_...

I''m suppose to create a function called calc_rectang_area(height, width),that takes two parameters: the height and width of the rectangular and return the area of the rectangular.

Differentiate between synchronous and asynchronous i/o, Differentiate betwe...

Differentiate between synchronous and asynchronous input/output with the help of an example. The input-output operation is asynchronous input/output operation since after the s

Combining goals and design principles, The Set Book assignment should enabl...

The Set Book assignment should enable you to begin talking about the usability of interactive products in terms of a variety of parameters. Instead of simply saying 'nice cell phon

Example of shared programming using library routines, Q. Example of shared ...

Q. Example of shared programming using library routines? Think about subsequent set of statements  Process A                                  Process B                  :

Explain busy hour call attempts in telephone traffic, With reference to tel...

With reference to telephone traffic, explain the terms BHCA. BHCA: The number of call attempts in the busy hour is termed as busy hour call attempts (BHCA) that is an importa

What is an "on input filed" statements, What is an "on input filed" stateme...

What is an "on input filed" statements? ON INPUT The ABAP/4 module is known as only if a field having the Value other than the initial Value. This initial Value is explain

Determine the sampling rate of nyquist criterion, As per Nyquist criterion ...

As per Nyquist criterion the sampling rate is (A) 2fs                                                  (B) (1/2)fs (C) (1/2fs)

Difference between data warehousing and data mining, Difference between dat...

Difference between data warehousing and data mining The difference between data warehousing and data mining is that data warehousing shows to the data storage while data mining

Explain working neural network work, Q. Explain working neural network work...

Q. Explain working neural network work? ANSWER: A neural network has an input layer with the factors under consideration, a middle or hidden layer that assigns and adjusts weig

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