News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Dining Philosophers

Started by aw27, May 19, 2018, 01:15:38 AM

Previous topic - Next topic

aw27

This is the MASM version of the known Dining Philosophers problem.
https://en.wikipedia.org/wiki/Dining_philosophers_problem
https://www.slideshare.net/YashMittal3/dining-philosophers-problem

Note that this version is not set to terminate, in order to keep it faithful to its original spirit, so you must press CTRL-C when don't want more.




dedndave

i would use a finite state machine   :t

zedd151

Quote from: dedndave on May 19, 2018, 05:31:47 AM
i would use a finite state machine   :t

[off topic]

There's Dave! Long time no see.

[on topic]

Just to keep with the topic, and sound like a bot:

I agree.   :biggrin:

daydreamer

nice :t
@Dave
nonworking CTRL-C and it turns into infinite state machine  :lol:
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

felipe

This is really cool. I think you can use this kind of programs to make some gambling programs. You will need to set some limit (like when 1 philosopher has eated all his food). So people can bet who finish first... :idea:

aw27

#5
Quote from: dedndave on May 19, 2018, 05:31:47 AM
i would use a finite state machine   :t
It is an implementation of a FSM, it has to to be.
It is also an implementation of a flowchart and an implementation of some pseudo code that is not there.  :t

aw27

Quote from: daydreamer on May 19, 2018, 08:35:18 AM
nice :t
nonworking CTRL-C and it turns into infinite state machine  :lol:
You must press the power button if everything else fails.  :idea:

aw27

Quote from: felipe on May 19, 2018, 12:17:59 PM
This is really cool. I think you can use this kind of programs to make some gambling programs. You will need to set some limit (like when 1 philosopher has eated all his food). So people can bet who finish first... :idea:

The window is open for all sorts of adventures.  :biggrin: