Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9525378

Have any Question?


Related Questions in Computer Engineering

Question suppose a data packet datagram is sent in the

Question : Suppose a data packet (datagram) is sent in the Internet from a source station (computer) to a destination station. What type of addess (physical, MAC, port address or some other) is used to forward the datagr ...

A chemistry student needsnbsp150 ml of acetone for an

A chemistry student needs 15.0 mL of acetone for an experiment. By consulting the  CRC Handbook of Chemistry and Physics , the student discovers that the density of acetone is 0.790 g.cm^-3. Calculate the mass of acetone ...

You have been recently promoted to it security manager your

You have been recently promoted to IT Security Manager. Your first job is to document the older hardware and software your company is currently using in the IT department. State the strengths and weaknesses with the curr ...

student who is taking quizzes public class student

/** A student who is taking quizzes. */ public class Student { private String name; private double totalScore; private int quizCount; public Student (String n) { name = n; totalScore = 0; quizCount = 0; } public String g ...

Question suppose a computer using set associative cache has

Question : Suppose a computer using set associative cache has 2^16 words of main memory and a cache of 128 blocks, and each cache block contains 8 words. Show steps, please type. a. If this cache is 2-way set associative ...

Bierco is a beer company based in germany you purchased the

BierCo is a beer company based in Germany. You purchased the stock in 2011 for 100 Euros when the exchange rate was 1.4 EUR/ USD. Today BierCo's price is 120 Euros and the exhange rate is 1.12 EUR/USD. What is the dollar ...

Research 3 risk estimation methodswrite a short explanation

Research 3 risk estimation methods. Write a short explanation of each method to someone with little knowledge of information security or risk. Compare the advantages and disadvantages the three methods above?

Say you want to match ip addresses however its likely that

Say you want to match IP addresses. However, it's likely that an invalid IP address such as 192.168.1.256 will match with your regex as well. What would you would need to do to validate that an IP address is valid, and w ...

Question 1a major department store chain is interested in

QUESTION 1 A major department store chain is interested in estimating the average amount its credit card customers spent on their first visit to the chain's new store in the mall. Fifteen credit card accounts were random ...

Suppose pointers are 4 bytes long and keys are 12 bytes

Suppose pointers are 4 bytes long, and keys are 12 bytes long. How many keys and pointers will a block of 16,384 bytes have?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As