Which one you will use to implement critical section?
Answer Posted / nirmalraj
Critical Section comes in single process environment they
didn't share accross process boundary.
In C if you wish to implement criticalsection you have to
use windows datastructure CRITICAL_SECTION and create a
object to access its members.
Initialize it
InitializeCriticalSection(&cs);
------------
-----------
function to call();
------------
DeleteCriticalSection(&cs);
.
.
call()
{
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the reasons of rebooting the system?
How do you kill a process using pid?
Explain thread.sleep?
What are multithreading models?
Explain how scheduling and priority works in threads?
How would you implement a thread pool?
How do you taskkill a program?
How to share printer through ftp(fire transfer protocol)?
How do I kill a process?
if a min thread has finished execution what happens ? a) it exits b) it wait for other threads c) becomes inactive ... etc etc
What is thread safety?
Describe the actions taken by thread library to context switch between user level threads?
What is thread safety and synchronization?
What is a p-thread?
Explain what is the impact if dns server fails?