Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Peterson Leader Election

Name: Anonymous 2010-10-25 0:07

Hey /prog/, for the Peterson Leader Election, if I'm using channels between the nodes with a queue in a multithreaded program, do I need to make the queue in each channel equal in size to the number of nodes?

tl;dr n nodes means n size of queue in channels in peterson leader election?

Name: Anonymous 2010-10-25 0:35

No

Name: Anonymous 2010-10-25 0:48

Then why does my teacher say so? It seems I just need to use a semaphore to be sure a channel is only being used by one thread at a time to pass info between nodes... I guess I'm confused.

Name: Anonymous 2010-10-25 1:17

/prog/ isn't a good place to ask for homework help, especially if you don't know how to ask good questions.

Name: Anonymous 2010-10-25 1:38

It's not homework help per se, he gives us certain things that might be on the test that we need to know how to implement, PLE is giving me some trouble, and googling it only leads to homework assignments from other universities...

I guess I'm asking what's the most efficient way to do it? A single variable to hold the value passed through the channel, and a 3 value array in the node, or a 3 value array in the channel ignoring semaphores and just going for semaphores on use of the node for value application... Oh well, /prog/ is too slow I'll just make a few test progs.

Name: Anonymous 2010-10-25 2:22

Fuck, are you retarded? It took me 30 seconds of Googling and 10 seconds of thinking to understand the entire algorithm up to the point of being able to implement a simulation for it.

Name: Anonymous 2010-10-25 20:54

>>6
>Hurp, are you derp?  It herp me 30 seconds of derp hurp derp de derpa derpa doo up to the derp of herpa derp to derp a herp for it.

Name: Anonymous 2010-10-25 22:19

>>7
LOL

Name: Anonymous 2010-10-25 22:38

>>6,7
You both same person, please go back to /b/ right now.

Name: Anonymous 2010-10-25 22:55

>>9
I mean >>7,8.

Name: Anonymous 2010-11-15 15:38

Name: Anonymous 2010-12-06 9:28

Back to /b/, ``GNAA Faggot''

Don't change these.
Name: Email:
Entire Thread Thread List