Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

know something about CRITICAL SECTIONS ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Do youknow something on critical sections. I tried the search engines. I didn't catch this concept at all. Is it another thing like a process or a thread?

thank you for your answer
(If you have a good address of a site dealing with it: do not hesitate!)

Bye :~)
 
I don't have any good sites for you unfortunately; however, I'll use keywords that might help you locate more information. Critical Sections are essentially a piece of code that only one thread or process can run at any given time; however, all the threads and or processes are tyring to run this code. The critical section usually contains shared data so that each process can communicate. A common solution to this problem is to use a mechinasim known as Semaphores. Semaphores "lock" and "unlock" the critcal section. When a process tries to access the critical section it checks that the semaphore isn't locked, if the critical section is not locked then the process trying to enter the critical section will take and lock the semaphore before entering the critical section. Example: { Critical Section }

Process1.....{...... }
Process2.....{ }
Process3.....{ }

Process1.....{...........}.
Process2.....{. }
Process3.....{ }

That is only the beginning but hopefully gives you a little better understanding and more keywords to search on. :)

-bitwise

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top