Zum Inhalt springen
L

Das Video kommt von YouTube: erst beim Abspielen verbindet sich die Seite mit YouTube (Google).

Operating systems - Critical sections

Alon Lalezari - אלון ללזרי2:30 276 Aufrufe veröffentlicht Auf YouTube

Das Wichtigste aus dem Video

Tipp auf eine Zeit – das Video springt genau dorthin.

Transkriptautomatisch erstellt · 12 Zeilen
Herunterladen
  1. Okay. So let's try to look to talk a little bit about critical sections in operating systems. Uh the idea of critical sections is that if I have at
  2. least two processes that has they that both both have the same resources they may change at the same time uh some resource for example a list.
  3. Let's take an example taking out a node in the list. Deleting a node and if I have two processes that work on that list at the same time they may delete a
  4. node and instead simultaneously instead of deleting two nodes because two processes worked on that list. What happened is that only
  5. one node was deleted even though two processes said or did a delete operation and this is not okay. This happens because the critical
  6. section is a section in which two processes work on a same resource. It means that when we are looking on a code of two processes there may be
  7. critical and non-critical sections. And when we are talking about a critical section, it's section that do something to a resource without doing something to
  8. a resource that is shared between the two processes. This is not a critical section. So in those critical sections I need to make sure
  9. that only one processes at a time work on it. I mean if one processes one process do a delete and one process do add or something like this to the same
  10. resource that is shared between the processes I need to make sure that at the same time only one process is working when he's doing it because if
  11. there will be a context switch at a time he works on the resource there may be weird things that happen as I mentioned so this is the idea of a critical
  12. Intersection between at least two processes that work on a shared resource.

Zum Nachlesen