Threads Interview Questions
- 0of 0 votes
Answersasked simple question about context switching, advantage/disadvantage of process vs thread etc
- Anonymous February 15, 2010| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Threads - 0of 0 votes
AnswersCan you serialze the following class
- Michael Gorenburg January 31, 2010
public class{
String st='mansoor-shaikh';
String int = 90;
Thread myThread;
}
Explain why and why not?| Report Duplicate | Flag | PURGE
Barclays Capital Software Engineer / Developer Threads - 0of 0 votes
AnswersHow will you handle multhithreading issues in Servlets
- Michael Gorenburg January 31, 2010
public MyServlet extends httpServelt}
private String = 'jackass-gorenberg'
private int counter=0;
doget(){
dopost()
service(){
//now access these global variables
}
}
Can you override service() method, and what you do when you access variables in service method, with respect to global variables| Report Duplicate | Flag | PURGE
Barclays Capital Software Engineer / Developer Threads - 0of 0 votes
Answershow would u implement mutex?
- dok January 22, 2010| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Threads - 0of 0 votes
AnswersOut of all the questions, MS asked me to implement a Reader writer lock problem.
- Aatish December 19, 2009
And obv., I did get it but not full proof!
Try to come up with a robust code/solution.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Threads Coding - 0of 0 votes
Answer1.Difference between GetMessage and PeekMessage?How are where would you prefer to use onre over the other.
- Cookie May 12, 2009
2.Address of a function is passed as a parameter to CreateThread().What would happen?
3.How can you see all the thread running in an application in Visual Studio?
4.Interthread and Intrathread communication using sendmessage and reply message.
5.Discuss ThreadInfo structure.
6.Say there are multiple thread running in an application.How do you stop one thread and execute other and come back to original thread?| Report Duplicate | Flag | PURGE
RSA Software Engineer / Developer Threads - 0of 0 votes
Answers1. Difference between GetMessage and PeekMessage?How are where would you prefer to use onre over the other.
- Cookie May 12, 2009
2.Can you use GetMessage to retrive message of thread running in different process?If yes then how?| Report Duplicate | Flag | PURGE
RSA Software Engineer / Developer Threads - 0of 0 votes
AnswersHow can deadlock be detected and prevented in practical scenarios?
- Anonymous March 03, 2009| Report Duplicate | Flag | PURGE
IBM Software Engineer / Developer Threads - 0of 0 votes
AnswersDo you know what a mutex is? Explain how it works.
- Bloomberg Interview February 20, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Threads - 0of 0 votes
AnswersWhat is a race condition?
- Asha February 12, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Threads - 0of 0 votes
AnswersWhat is a deadlock and how do you avoid it?
- Asha February 12, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Threads - 0of 0 votes
AnswersWhat is the difference between thread and process?
- Asha February 12, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Threads - 0of 0 votes
AnswersWhat do you understand by deadlock?
- neil turok December 17, 2008| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Threads - 1of 0 votes
AnswersWhat's the difference between a thread vs process?
- geeky_freak July 22, 2008| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer / Developer Threads - 1of 0 votes
AnswersWhat's the difference between a mutex and a semaphore?
- geeky_freak July 22, 2008| Report Duplicate | Flag | PURGE
VMWare Inc Software Engineer / Developer Threads - 0of 0 votes
AnswersOnsite Interview (coding test) --
- The Hercules April 04, 2008
Q4) Implement a Singleton pattern as a template such that, for any given class Foo, I can call Singleton<Foo>::instance() & get a pointer to a singleton of type Foo. Assume the existence of a class Lock which has acquire() & release() methods. The implementation should be thread safe & exception safe| Report Duplicate | Flag | PURGE
Automated Traders Desk Software Engineer / Developer C++ Object Oriented Design Threads - 0of 0 votes
AnswersWhat's the difference between process and thread? What kind of information does thread maintain? its own stack? heap?
- Khoa March 23, 2008
How and when to do a context switch? How do you handle an time slice interrupt?
What are the possible pitfalls for multi-thread programming?| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer System Design Threads - -1of 0 votes
AnswersMicrosoft onsite multithread synchronization interview question
- dawninghu February 15, 2008
1. Suppose we have a class:
class Foo {
Public:
A(.....); //if A is called, a new thread will be created and the corresponding function will be executed.
B(.....); //if B is called, a new thread will be created and the corresponding function will be executed.
C(.....); //if C is called, a new thread will be created and the corresponding function will be executed.
......
}
Suppose we have the following code to use class Foo (We do not know how the threads will be scheduled in the OS.)
Foo f;
f.A(.....);
f.B(.....);
f.C(.....);
Questions (Part A):
1. Can you explain multithread synchronization mechanism?
2. Can you design a mechanism to make sure that B is executed after A, and C is executed after B?
Questions (Part B):
Suppose we have the following code to use class Foo (We do not know how the threads will be scheduled in the OS.)
Foo f;
f.A(.....);
f.B(.....);
f.C(.....);
f.A(.....);
f.B(.....);
f.C(.....);
Q: 1. Can you design a mechanism to make sure that all the methods will be executed in sequence?
Questions (Part C):
2. Can you design a mechanism to make sure that all the methods will be executed in sequence, in this case the caller should
be nonblocked?
3. Can you design a mechanism to make sure that all the methods will be executed in sequence, in this case the caller and the
called methods should be nonblocked? (hint: use call back).
Please write the corresponding code.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Threads - 0of 0 votes
AnswersWhat does Synchronized keyword before a method do in Java?
- perllove January 19, 2008| Report Duplicate | Flag | PURGE
Amazon Development Support Engineer Java Threads