File:Deadlocks and the 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 50 s, 1,280 × 720 pixels, 802 kbps overall, file size: 4.75 MB)

Captions

Captions

Concurrent algorithm design

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.

Reference:

Dining philosophers image: bdesham - https://commons.wikimedia.org/wiki/File:An_illustration_of_the_dining_philosophers_problem.png
Date
Source Own work
Author Argosopentech

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

File history

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

Date/TimeThumbnailDimensionsUserComment
current17:59, 27 February 202250 s, 1,280 × 720 (4.75 MB)Mitar (talk | contribs)Fixed file.
23:42, 28 January 20220.0 s, 1,280 × 720 (4.75 MB)Argosopentech (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 290 kbps Completed 18:00, 27 February 2022 1 min 3 s
Streaming 720p (VP9) 197 kbps Completed 22:18, 12 March 2024 1.0 s
VP9 480P 197 kbps Completed 18:00, 27 February 2022 57 s
Streaming 480p (VP9) 103 kbps Completed 05:25, 31 January 2024 1.0 s
VP9 360P 156 kbps Completed 17:59, 27 February 2022 35 s
Streaming 360p (VP9) 63 kbps Completed 07:59, 6 February 2024 1.0 s
VP9 240P 132 kbps Completed 17:59, 27 February 2022 36 s
Streaming 240p (VP9) 39 kbps Completed 14:23, 16 December 2023 1.0 s
WebM 360P 177 kbps Completed 18:00, 27 February 2022 1 min 43 s
Streaming 144p (MJPEG) 1.02 Mbps Completed 02:00, 3 November 2023 4.0 s
Stereo (Opus) 94 kbps Completed 10:49, 21 November 2023 2.0 s
Stereo (MP3) 128 kbps Completed 14:36, 1 November 2023 2.0 s

File usage on other wikis

The following other wikis use this file:

Metadata