What do you mean by a critical section?
A critical section is a piece of code of a process that accesses a shared resource that must not be accessed by more than 1 thread of execn.
1.a thread is smallest seq of programmed instrns and process is made of many threads.plz xplain in a bit detail....
2.Does a process have only 1 critical section?
3.Can 2 or more processes be in their critical section at the same time?If no why? bcoz whats the prob if the critical sections are accessing diff shared resources?
4.Also tell me what is a semaphore...i only know it is used to avoid access by multiple processes to a common resource...

please refer to following books:-
1. Operating Systems 5th Edition. Author, William Stallings
2. Operating System Concepts 8th Edition Author: Silberschatz Galvin
i read last semester and the topics have been explained in very precise manner.

@ravi_14
Good references.
@inspire_all
These are basic problems in concurrent programming systems. Read the text books your professor has assigned for your class. We don't do your homework for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.