Question

12a Explain briefly (without giving any code) how threads can be used to simplify code that performs asyn- chronous operation

0 0
Add a comment Improve this question Transcribed image text
Answer #1

12a.Threading is a programming language that permits two or more programming execution points to run in application at the same time.Threads can be used to simplify code that performs asynchronous operations within an IO controller is that the thread will continue to work in parallel.In case of multithreading with IO controller it has two effects

1.Use multiple CPUs concurrently.

2.Use a CPU with one thread blocked.

12b.U thread_yield-It temporarily stops current thread if other threads are waiting.

uthread_block-A sleeping thread could be woken by using uthread_block.

12c.A thread could not be waken by itself.A thread that is blocked in wait() cannot execute any code until unblocked.

12d.A system in which there is only one thread is on ready queue when a thread unblocks then multithreading takes place.On a single core microprocessor it is possible to run multiple threads but not in parallel.The threads are running at same time but they are running in time slices allocated and controlled by OS.

Add a comment
Know the answer?
Add Answer to:
12a Explain briefly (without giving any code) how threads can be used to simplify code that...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • How can we assess whether a project is a success or a failure? This case presents...

    How can we assess whether a project is a success or a failure? This case presents two phases of a large business transformation project involving the implementation of an ERP system with the aim of creating an integrated company. The case illustrates some of the challenges associated with integration. It also presents the obstacles facing companies that undertake projects involving large information technology projects. Bombardier and Its Environment Joseph-Armand Bombardier was 15 years old when he built his first snowmobile...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT