Concurrent Problem

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 104

  • @DrMutran
    @DrMutran 2 года назад +245

    I respect how smart the people who made this show are, if only I was smart enough to understand some of this.

    • @ZephyrBW
      @ZephyrBW 2 года назад +18

      Basically to save the program one must be denied every time. At least that’s how I got

    • @aakashsinha9641
      @aakashsinha9641 2 года назад +59

      simple explanation : Consider 3 spoons ( S1, S2, S3 )and 4 people ( A1, A2, A3, A4). Now all four people want to eat with spoon, problem is there is one less spoon. If all 4 people try to get spoon at same time, they will fight for spoon ( in computer, processes trying to get computer resource), this will lead to no one having food and no process will be completed. This above situation is called dead-lock.
      solution to above problem:
      1. Give priority : let's say we set priority like A1 > A2. Now if there is only one spoon and 2 person, since A1 is having higher priority he will use spoon, meanwhile A2 will wait for process to finish and then will use it, this way there will be no fighting for spoons.
      2.first come, first serve: this is generally avoided in larger programs

    • @ZephyrBW
      @ZephyrBW 2 года назад +14

      @@aakashsinha9641 Wow thats amazing

    • @mwe8414
      @mwe8414 2 года назад +2

      word

    • @Karpe_Deem
      @Karpe_Deem 2 года назад +11

      I went "wow honey"

  • @miavaughn2393
    @miavaughn2393 2 года назад +110

    This is 1000% the solution to the ai memory/degradation problem. The third party to choose when and how the "sticks are picked up" Caspian chooses at the end is David. Some third party needs to choose the hierarchy of memories to keep and which to "store/delete". Memories would have to be structured like this and kind of already are, but especially need a coding solution like this in an immortal ai situation.

    • @suzygirl1843
      @suzygirl1843 Год назад +6

      Why did Caspian have to be abused or witness it? Are kids that experience trauma more accustomed to asking complex questions and problem solving? I know it's to track Holstrom's exact childhood... but why do geniuses have to come from broken homes even with 2 parent households? Holstrom is modeled after Steve Jobs who had loving Catholic parents but couldn't figure out why he was adopted away.

    • @nek729
      @nek729 Год назад +14

      @@suzygirl1843 There are many ways to create a genius if you repeat the exact genome in with the exact epigenetic differences and vital events in their life. The story isn't saying that geniuses come from broken homes, it's just saying that Holstrom came from a broken home. Holstrom is the only genius at his level that they have the specific genome and record of vital life events. It's also essentially a cult about his legacy, they're obsessed with him alone. They don't have Einsteins DNA and verifiable record of every key moment in his childhood

    • @itsjustvin7630
      @itsjustvin7630 Год назад +1

      @@suzygirl1843 but that's Steve Jobs. Not Steven Holstrom

    • @randomperson4344
      @randomperson4344 Год назад +3

      i never noticed this but if this is intentional the foreshadowing is insane

    • @minanathans6005
      @minanathans6005 Год назад +1

      ​@@suzygirl1843honestly- I'm not convinced Caspian DID need to be abused/witness abuse in order to give Holstrom's weird little cult the result they were expecting. I don't think they had any proof beyond the world's least competent shrink saying 'This should work!' that re-doing Holstrom's whole childhood was more likely to turn out a child genius. Their lone motivation was 'Well, it worked the first time...'

  • @sphereornament276
    @sphereornament276 2 года назад +52

    Oh also, ya know how the mom gives her answer, and the husband says that's an allegory for Heaven/Hell - I think I found the reference. It's a zen parable. It states that Heaven and Hell are exactly the same, both with a long dining hall and a super tasty hot pot. However, the chopsticks are a meter long, and the rule is that they have to hold onto the ends. In Hell, no matter how hard they try, people can't get the food into their mouths, so they starve. However, in Heaven, each person feeds the person sitting opposite from them at the table!

    • @vlydia713
      @vlydia713 5 дней назад

      Thanks for the explanation!

  • @aakashsinha9641
    @aakashsinha9641 2 года назад +60

    simple explanation : Consider 3 spoons ( S1, S2, S3 )and 4 people ( A1, A2, A3, A4). Now all four people want to eat with spoon, problem is there is one less spoon. If all 4 people try to get spoon at same time, they will fight for spoon ( in computer, processes trying to get computer resource), this will lead to no one having food and no process will be completed. This above situation is called dead-lock.
    solution to above problem:
    1. Give priority : let's say we set priority like A1 > A2. Now if there is only one spoon and 2 person, since A1 is having higher priority he will use spoon, meanwhile A2 will wait for process to finish and then will use it, this way there will be no fighting for spoons.
    2. first come, first serve: this is generally avoided in larger programs

    • @lumberluc
      @lumberluc 2 года назад +10

      3rd; Overlord protocol. 1 spoon isn't picked up till given permission. Once permission given to X person, X person picks it up and eats.
      This is a redirection of resources while throttling how much data's input/output stream is.
      Issue about this protocol is that one entity given priority according to the Overlord's priority. So A1, A2, A3, and A4 have the same level of priority as the next one, just the time limit is superimposed. Unless, priority protocols have been issued by one of the people to be granted additional time.
      This setup would require additional limits to insure X person isn't granted Y amount of time.
      It's an AI problem, and a very dangerous one.

    • @ZephyrBW
      @ZephyrBW 2 года назад +2

      Basically there’s always one left out no matter what

    • @FiggFig
      @FiggFig 2 года назад

      that sounds too simple and I'm left searching for answers.

    • @nek729
      @nek729 2 года назад +3

      What Caspian presents is a third option that is now coming into a technological zeitgeist through AI. An AI could act as a third party and determine which process need to be completely when to determine the most efficient order. Essentially, a dynamic priority system that takes many factors into account.

    • @jothamprince8765
      @jothamprince8765 2 года назад +1

      Thanks for the Operating Systems reminder, honestly I'd read about this in process synchronization in college but the way they where frazing it in the show, I didn't get it, but now I do, jhus basic process synchronization

  • @sphereornament276
    @sphereornament276 2 года назад +109

    This is known as the "Dining Philosophers" problem. My explanation:
    The premise is that there are five philosophers at a table. In between each philosopher is a chopstick; thus there are five chopsticks. The philosophers alternate between thinking and eating. If they want to eat, they have to pick up the chopsticks one at a time (first right then left), and need BOTH chopsticks before they eat.
    A guess at a solution may be : "okay, each philosopher picks up the chopstick on their right, and then picks up the one on their left, and then they eat food!". Well that doesn't work... If each philosopher picks up the stick on the right at the same time, then there will be no chopsticks left for a philosopher to pick up on their left. Remember, there are 5 philosophers and 5 chopsticks. They wait forever for a chopstick on their right to show up. Bad. This is called a -deadlock-.
    The dad seeks to avoid this in his solution: assign an order, 1-5, to the chopsticks. The new rule is that each philosopher, one at a time, has to pick up the lowest order chopstick in front of them first. For example, philosopher 1 picks up chopstick 1 from his two choices (1 and 2). This works great for the first four philosophers. However, the fifth philosopher is going to have two chopsticks in front of them (1 and 5). They need to pick up the lowest chopstick, but the first philosopher already picked up 1. Thus the fifth philosopher doesn't pick up anything. This means chopstick 5 is open!! Yay, now one philosopher can start eating with 4 and 5, and when he is done and put down his chopsticks, others can eat. This avoids a deadlock.
    But.. this is not efficient for computers with large databases, as Caspian said.
    Caspian's explanation involves having a waiter. Basically, the philosophers just ask if they can pick up a chopstick, and the waiter checks to see if doing so would involve a deadlock before letting them. The waiter would also make sure to let people who haven't eaten longer to have priority, so no one starves. "Mutex" is just a fancy CS term used for the waiter. Oh, and the reason he mentions parallelism, cuz is "a type of computation in which many calculations or processes are carried out simultaneously". A waiter reduces this. BTW I'm no expert, so apologies for any mistakes.

    • @ZephyrBW
      @ZephyrBW Год назад +5

      That’s cool

    • @selamnew8302
      @selamnew8302 Год назад +11

      I am not an expert? bro i am a cs student and you made it as simple as possible. Respect!!!

    • @sphereornament276
      @sphereornament276 Год назад +4

      @@selamnew8302thank you!!! I’m a CS student too 😊

    • @standowner6979
      @standowner6979 10 месяцев назад +1

      Teach your ways, master.

    • @standowner6979
      @standowner6979 10 месяцев назад +1

      Teach me your ways, master.

  • @DEFkon001
    @DEFkon001 3 месяца назад +3

    I think most tangible non computer science example of this problem is an intersection for cars. A small intersection with low traffic might be able to get away with a stop sign, and basic rules about which car gets priority but on high traffic intersections with multiple lanes that would descend into chaos causing accidents and dead lock. The 3rd party solution would be a traffic light, or traffic officer that would stay at the intersection directing which lanes and cars can go.
    Another real world example could be how airports operate. At a busy airport pilots need to call the airport to get permission to land or take off. The Airport traffic controllers take on the role of the “waiter” and can dynamically adjust priority based on emergencies, remaining fuel, weather etc.

  • @Bolypius
    @Bolypius 2 года назад +22

    I love this show

  • @jackhall4767
    @jackhall4767 Год назад +28

    God this show is extremely underrated..

  • @MaestroKatProductions
    @MaestroKatProductions 2 года назад +93

    This will definitely not become a future plot point in the series

    • @TheNitroPython
      @TheNitroPython 2 года назад +2

      Hahahahah

    • @jesuseduardoroldan
      @jesuseduardoroldan 2 года назад +1

      Lols dinner exposition

    • @ZephyrBW
      @ZephyrBW 2 года назад +1

      You mean one must be sacrificed in the end

    • @albozru1e
      @albozru1e Год назад +1

      Yeah sorry bro the show got cancelled

    • @MaestroKatProductions
      @MaestroKatProductions Год назад +2

      @@albozru1eYeah, I was shocked when I heard it happen
      So much potential down the drain...

  • @sickboydroid
    @sickboydroid 7 месяцев назад +5

    Pantheon is such an underrated anime

    • @ggyggg2272
      @ggyggg2272 3 месяца назад +2

      It's not an anime 😂😂 and yes it's very underrated.

    • @sickboydroid
      @sickboydroid 3 месяца назад

      @@ggyggg2272 i still listen to its songs. Anime or not, its really good

  • @alexsolomon8127
    @alexsolomon8127 Год назад +11

    I get most of it. my solution is: break the effing chopstick in half and use the two smaller chopsticks. but it's NOT really about chopsticks.

    • @rabbitadventurous9441
      @rabbitadventurous9441 11 месяцев назад +3

      Or just use our hands

    • @laura.songyi
      @laura.songyi 7 месяцев назад +1

      no, i mean that does work.
      split the resources equally between systems and have them all run proceses at the same time, though slightly less efficient and more power requirement due to "smaller chopsticks"

  • @vlydia713
    @vlydia713 5 дней назад +1

    And this is how load balancers were born

  • @Gary_Yang_Sky
    @Gary_Yang_Sky 11 месяцев назад +5

    Did I just fucking get dinning philospher'ed in a show... LEAVE ME ALONE I don't want to think about mutex's while not geting paid

  • @Butters-ly3hq
    @Butters-ly3hq 2 года назад +26

    i'm ditching house of the dragons to watch this

  • @AmjadRifaii
    @AmjadRifaii 2 дня назад

    the way he describes the problem makes it more complicated, if the chopstick meant a pair then it means it leaves one man out without eating, and when the guy who finishes eating first drops his chopsticks the guy who didn't eat previously picks them up and eats. that's called (FIFO first in first out), but in a more realistic world where you can't leave a process unnoticed(man without eating in this example) you would use something like (Round Robbing + multi priority queue), BUT in the example he gives, if a chopstick is meant as only 1 of the pair, the problem gets more complicated since only 2 guys could eat and 1 guy would have only 1 chopstick, but the same type of algorithm could be used but more people would be starving or each guy gets a shorter time to eat(each process gets less time to work but all processes have a chance to work, leading to finishing the processes later but all processes would be worked on equivalently ).

  • @numberoneappgames
    @numberoneappgames Год назад +1

    Borrow a stick while someone chewing. :(

  • @Dehslash9
    @Dehslash9 2 года назад +3

    Yeah I still don't get it.
    If someone can summarize this for me I would be grateful

    • @ainsleyplays3768
      @ainsleyplays3768 Год назад +2

      Basically if the program has an assigned hierarchy, it’ll work if you have only one database. If you introduce more than one database it stalls and crashes, to solve the issue introduce a third party, essentially a mediator who grants permission to allocate resources so the program runs smoothly
      Edit: I hoped that helped. If not tell me and I’ll try to explain better, I’m not good at it but that’s why I try. Practice makes better

  • @th3bigbomb
    @th3bigbomb Год назад +2

    Dammit still no season 2😢

  • @ElasticGoblin
    @ElasticGoblin Год назад +1

    Unfortunately it was canceled. If it was on Netflix or hulu it would definitely have succeeded

    • @drybjed
      @drybjed Год назад

      Good news, it's on Amazon Prime, second season starts on Sunday.

    • @ElasticGoblin
      @ElasticGoblin Год назад

      @@drybjed seriously? Holy shit yes!

    • @larrytherustyboii7442
      @larrytherustyboii7442 Год назад

      ​@@ElasticGoblinwatched the entire season.

  • @An_Almeida8492
    @An_Almeida8492 17 часов назад

    Daora

  • @MikaTheCassetteGuy
    @MikaTheCassetteGuy Год назад

    0:25

  • @nazaren45
    @nazaren45 Год назад

    👌

  • @fineblanket
    @fineblanket 2 года назад +5

    my whole issue was why they would want a boy genius to grow up with an abusive dad

    • @Bolypius
      @Bolypius 2 года назад +23

      Because for the inflection points in his life must be achieved, the trauma and experience with his father would have to shape him into becoming holstrom, this is an expensive experiment with a lot of people pulling the strings, and Caspian has a purpose, he wasn't born to run in the dark bumbling for meaning.

    • @argonauttales
      @argonauttales 2 года назад +9

      His life was modeled after Stevens. To manipulate Caspians character development they tried to mirror the childhood of the original.

    • @suzygirl1843
      @suzygirl1843 Год назад

      @@argonauttales We get that. The question is that are abused kids more accustomed to complex problem solving skills? Because they were deprived?

    • @nek729
      @nek729 Год назад +7

      @@suzygirl1843 No, this was just Steven Holstroms development. Every person has a different brain, that reacts different to certain stimuli. Holstrom in particular became the way he did because of his abusive dad and fighting back. So a clone of Holstrom would react the same way, provided everything else was in order. However, if they just raised a random baby like this, it might react differently, like becoming more violent/aggressive or even killing himself.

    • @suzygirl1843
      @suzygirl1843 Год назад

      @@nek729 That can't be proven IRL

  • @shortstick4373
    @shortstick4373 2 года назад +4

    OBAMNA

  • @robertdeniro241
    @robertdeniro241 День назад

    just introduce a simple lock or mutex, no need for a third party. have the program or code make the philosopher's pick up both the chopsticks OR non at all ( so check start eating ONLY if they acquire both the locks OR dont eat, thereby making eating an atomic process), this makes it so that they dont pick 1 up and start waiting for the other to be released, thereby ensuring no deadlock occurs or ensuring the program doesnt go into a circular wait. "introduce an arbiter" shut up kid theres no need for that, waste of extra resources when this solves it.

    • @ZorooRonoa-uz9zl
      @ZorooRonoa-uz9zl 17 часов назад +1

      That is essentially what he describes but he's talking about this in the context of a high performance (maybe distributed?) computing environment. The third party is the mutex if you are in a single process/node environment or a lock service in a distributed environment. "You need permission to lift" = grabbing a lock and can freely put down is releasing that lock

  • @adriankoh4859
    @adriankoh4859 3 месяца назад

    Our religion is too powerful for this show! Help! 😭

  • @HocDaddy
    @HocDaddy Год назад +4

    What show is this?

    • @12345Darkone
      @12345Darkone Год назад +5

      Pantheon

    • @abman136
      @abman136 Год назад +1

      too bad you can't watch this legally anymore

    • @epicm999
      @epicm999 Год назад +2

      @@abman136 lmfao

    • @tariyamori
      @tariyamori Год назад

      ​@@abman136 let's hope. I heard it could still get picked up