Should you protect the global data in threads? Why or why
not?

Answers were Sorted based on User's Feedback



Should you protect the global data in threads? Why or why not? ..

Answer / srini

Global datas needs to be protected in threads since threads
share address space with each other.

Is This Answer Correct ?    10 Yes 1 No

Should you protect the global data in threads? Why or why not? ..

Answer / aravind k r

Global data need to be stored in a common place where each
thread can access it within that program. So it shouldnot
be stored on a particular thread but in the process's
memory where each thread can access it.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More OOPS Interview Questions

what is single inheritance?

18 Answers   IBM,


Why static functions always uses static variables?

3 Answers  


Why polymorphism is used in oops?

0 Answers  


What do you mean by overloading?

0 Answers  


difference between overloading and overridding

11 Answers  






Can bst contain duplicates?

0 Answers  


C#.net Interview Question A=10 B=5 C=A+B Print C The above will be given in a multiline textbox. You need to parse the above input, store values for A,B&c. And you have to display the value of C.

1 Answers   Syncfusion,


State what is encapsulation and friend function?

0 Answers   BirlaSoft,


How do you answer polymorphism?

0 Answers  


what is meant by files?

4 Answers   Infosys,


What is the difference between const int *ptr and int const *ptr???

2 Answers  


What is the real life example of polymorphism?

0 Answers  


Categories