Tuesday, November 30, 2021

The Dining Philosophers Problem

The dining philosophers problem is well known in computer science
Dealing with matters of access, it has analogues in our headlines
Humanity's curriculum involves many rituals and traditions
Perhaps, then, it's worth explaining the problem's formulation

The diners that are gathered here today are five in number
Imagine, if you will, your favorite group of philosophers
They are initially presented in a state of silence at the venue
Around a round table, hungry they are, for spaghetti is on the menu

The central conceit is that each philosopher must alternately think and eat
Implicit also is that they are vegetarians or vegans, for there is no meat
The rules of the social game adds the constraint of manners as the main course
That they can only dig into their spaghetti if they have both left and right forks

After a philosopher finishes eating, but before launching into thought,
They must put down both forks to make them available for others.
Forks, in this arrangement, can only be held by one philosopher at a time.
The problem's construction teaches that sharing is caring at mealtime

To add realism to the scenario, we can assume there is an unlimited supply of food
And that our philosophers can eat long past the point that would normally be good
With these core ingredients: philosophers, spaghetti, forks (but no knives)
The problem is meant to illustrate the challenges of living parallel lives

An utter conundrum, this problem when it was presented to me at university
That, while I could discern that it had applications in the study of concurrency,
The problem was going from this set of instructions to designing an architecture
Full disclosure, I damn near failed this course on algorithms and data structures

The enduring challenge, if you think about it, is how to avoid deadlock
The fear is of resource starvation such that the actors find themselves stuck
We want a world in which no philosopher will starve and continue forever
To eat and think deep thoughts; a metaphor, this immortal philosopher

The Last Philosophers

Timing is everything in the choreography of actors
Finding a strategy to manage this human infrastructure
The fundamental issue at hand, the term of art, is mutual exclusion
A stark concept, therein lies the difficulty with the algorithm

The conventional solution involves a resource hierarchy
I found it quite unfair because it clearly lacks neutrality
But it can be proven to work, if one heeds the instructions and laws
It applies an ordering to the distribution of shared resources

Another strategy that has been advanced is arbitration
This one I tried out, as I'm a firm believer in conversation
Once you designate a mediator, and open yourself up to abide by their resolution,
As the song goes, it takes behavior to get along, diplomacy can be the solution

The philosophical issues are many with middlemen, think of Caesar's tax collectors
And of the oligarchs and monopolists who insert themselves as toll collectors
Who are the designers of these systems in humanity's curriculum?
Who gets to make the rules? And who pays soul insurance premiums?

Game theory can come into play, think of the prisoner's dilemma
The shortest path to success might be to seize resources - state capture
Write the ruler's rules, and steal power like a conqueror
Rehearse a coup drill following the lead of many a dictator

I found that the problem had all the makings of a cautionary fable
Earlier, you might recall, I held my fire at that philosopher's table
Where rage, and its contemporary uses, were the bone of contention
'Twas decidedly, I'd explained, a case of normalcy prohibition

I had been thinking about this modernity of parallel lives
Where some have the great privilege of their insatiable appetites
A state of the world in which no progress is possible
We would do well to study the Mosquito Principle

equality rosewood park

See previously:

The Dining Philosophers Problem, a playlist

A soundtrack for this treatise, bookended by the great divas (spotify version)

Timing is everything
Observers are worried

File under: , , , , , , , , , , , , , , ,

Writing log: March 28, 2021

No comments: