Trisha

Trisha

  • NA
  • 4
  • 6k

about multi threading

Aug 15 2013 1:31 AM
Question 1.

You are given a paragraph , which contain n number of words, you are given m threads. What you need to do is , each thread should print one word and give the control to next thread ... this way each thread will keep on printing one word , in case last thread come, it iwill invoke the first thread ... procedure will repeat until all the words are printed in paragraph. Finally all the thread should exit gracefully. What kind of synchronization will use ?


Question 2.
How could you make sure that thread A ,B and C run sequentially without using join method?

These question was asked in interview and found this site is too good for c# so hope to get answer as soon as possible.

thank you in advance.

Answers (2)