We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,371 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Need help getting started!

My distributed operating system lab requires me to implement the election algorithm (bully and ring) in c.

My current idea is to run several instances of an ouput file on different terminal, each symbolizing a different process. Now i'm facing the following problem and if you guys could just point me in the right direction, that would be great!

To simulate the election process, i would require all the processes(instances of the program code im running in different terminals) to be aware of all the other instances. How can i achieve this?

2
Contributors
3
Replies
5 Hours
Discussion Span
1 Year Ago
Last Updated
4
Views
shantanusinghal
Newbie Poster
12 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
DeanMSands3
Posting Whiz
310 posts since Jan 2012
Reputation Points: 80
Solved Threads: 42
Skill Endorsements: 1

Used shared memory.
This will help you get started.

On distributed systems, conceptually there is no common central memory so the communication should always be by means of message passing.

But from what i'ev leared from here, message passing requires prior knowledge of the recepient.

What i would like ideally is for there to be a list, to which each process subscribes on creation and each process can then broadcast to the entire list and the recepients can then send a direct message to the sender.

shantanusinghal
Newbie Poster
12 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
DeanMSands3
Posting Whiz
310 posts since Jan 2012
Reputation Points: 80
Solved Threads: 42
Skill Endorsements: 1

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0871 seconds using 2.74MB