@rahul: buddy, u can ignore the mail if u don't want to answer (no offense). Lets not discourage someone from asking questions...
On Tue, Jun 21, 2011 at 11:23 PM, rahul <rahulr...@gmail.com> wrote: > If u want us to solve the GATE paper, please attach the paper, we will post > the solution. > > regards. > > > On Tue, Jun 21, 2011 at 11:21 PM, Akshata Sharma < > akshatasharm...@gmail.com> wrote: > >> The atomic fetch-and-set x, y instruction unconditionally sets the memory >> location x to 1 and fetches the old value of x n y without allowing any >> intervening access to the memory location x. consider the following >> implementation of P and V functions on a binary semaphore S. >> >> void P (binary_semaphore *s) >> unsigned y; >> unsigned * = &(s—>value); >> do >> fetch—and—set x, y; >> while (y) >> >> void V (binary_semaphore *s) >> S—>value = 0; >> Which one of the following is true? >> (A) The implementation may not work if context switching is disabled in P >> (B) Instead of using fetch-and —set, a pair of normal load/store can be >> used >> (C) The implementation of V is wrong >> (D) The code does not implement a binary semaphore >> >> -- >> 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. > -- 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.