@roy : yes , kind of , i didnt know the exact technical term for it. Not exactly PCB but process can maintain a lookup table for all the shared variable and there corresposing threads . or for every thread the shared variable. or ,may be in the thread itself, you can have a linked list pointer which points to all the shared variable list. Before terminating , get that address. I mean it is imagination, i suggested some ways but i exactly dont know what Windows or Unix employs to do the task.
On Sun, Aug 14, 2011 at 3:03 PM, aalam roy <aalamr...@gmail.com> wrote: > @ankur i think you are talking about cleanup handlers. these are the > functions which are executed when a thread terminates. but can you give any > hint how it can be accomplished using process control block. > > > On Sun, Aug 14, 2011 at 2:15 PM, Kamakshii Aggarwal <kamakshi...@gmail.com > > wrote: > >> @ankur::nahi samajh aaya..:( >> >> >> On Sun, Aug 14, 2011 at 9:46 AM, Ankur Khurana >> <ankur.kkhur...@gmail.com>wrote: >> >>> My 2 cents, >>> When the termination signal is sent to the thread either synchronously or >>> asynchronously , you just have a mechanism in place that if that thread is >>> in critical section , it exits from there and and unlocks the mutex at point >>> of exit. This can be done by associating a tokken with the thread that it >>> is executing in critical section and what mutex it locked. O we can do this >>> by making some table in Process control block. >>> >>> On Sat, Aug 13, 2011 at 7:56 PM, Kamakshii Aggarwal < >>> kamakshi...@gmail.com> wrote: >>> >>>> >>>> How do you make sure to unlock a mutex which was locked in a thread that >>>> dies/terminates? >>>> -- >>>> Regards, >>>> Kamakshi >>>> kamakshi...@gmail.com >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To post to this group, send email to algogeeks@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> algogeeks+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/algogeeks?hl=en. >>>> >>> >>> >>> >>> -- >>> Ankur Khurana >>> Computer Science >>> Netaji Subhas Institute Of Technology >>> Delhi. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to algogeeks@googlegroups.com. >>> To unsubscribe from this group, send email to >>> algogeeks+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> >> >> -- >> Regards, >> Kamakshi >> kamakshi...@gmail.com >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.