File:Dining Philosophers Problem.webm

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(WebM audio/video file, VP8/Vorbis, length 8 min 20 s, 1,280 × 720 pixels, 297 kbps overall, file size: 17.69 MB)

Captions

Captions

Explaination and solution for the Dining Philosophers concurrent programming problem

Summary[edit]

Description
English: In this video we will cover the “Dining Philosophers” problem.

The “Dining Philosophers” problem is an example problem to demonstrate concurrent algorithm design.

A group of philosophers sit around a table and alternate between thinking and eating using the forks on their left and right. The forks represent a shared resource between the pair of philosophers on either side of them. Philosophers need both forks to eat and only one philosopher can use a fork at a time.

If the philosophers were to simply take forks as they needed them a situation could occur where a circle of philosophers are each holding one fork and waiting on another philosopher to give up a fork. This is referred to as a “deadlock”.

A simple solution to this problem is to add a waiter, who represents a lock, that the philosophers need exclusive access to before picking up either of their forks. Once a philosopher has exclusive access to the waiter’s attention they have that attention until the philosopher has successfully picked up both forks. When a philosopher has exclusive access to the waiter they will succeed in picking up their forks either because both forks are available, and no other philosophers have the waiter's attention, or they will wait with the waiter’s attention for the philosophers on either side of them to give up their forks.

This solution of using a central arbitrator to manage access prevents a circular cycle of philosophers holding one fork while waiting on another philosopher for their other fork that causes a deadlock. This solution is fair because all of the philosophers have equal access to the waiter. However, it can be inefficient because philosophers have to wait for the waiter even when both of their forks are available.
Date
Source Own work
Author Pjfinlay

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current00:17, 10 July 20218 min 20 s, 1,280 × 720 (17.69 MB)Pjfinlay (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Transcode status

Update transcode status
Format Bitrate Download Status Encode time
VP9 720P 102 kbps Completed 00:20, 10 July 2021 2 min 42 s
Streaming 720p (VP9) 78 kbps Completed 23:44, 13 March 2024 1.0 s
VP9 480P 58 kbps Completed 00:19, 10 July 2021 2 min 40 s
Streaming 480p (VP9) 34 kbps Completed 14:14, 2 February 2024 1.0 s
VP9 360P 42 kbps Completed 00:20, 10 July 2021 2 min 46 s
Streaming 360p (VP9) 18 kbps Completed 19:59, 6 February 2024 1.0 s
VP9 240P 35 kbps Completed 00:18, 10 July 2021 1 min 25 s
Streaming 240p (VP9) 11 kbps Completed 22:04, 16 December 2023 1.0 s
WebM 360P 54 kbps Completed 00:19, 10 July 2021 2 min 29 s
Streaming 144p (MJPEG) 284 kbps Completed 09:09, 3 November 2023 9.0 s
Stereo (Opus) 25 kbps Completed 20:56, 21 November 2023 3.0 s
Stereo (MP3) 36 kbps Completed 20:21, 1 November 2023 6.0 s

Metadata