GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

OS final

Duncan Levings 42 Fragen

Quiz starten

Dieses Quiz enthält Fragetypen, die sich im gewohnten Player öffnen.

Fragen in diesem Quiz (42)

  1. 1Deadlocks
    Multiprogramming environment characterized by several process competing for a limited number of resources
    1. ARichtig
    2. BFalsch
  2. 2Deadlock can arise if four conditions hold simultaneously
    1. AMutual exclusion
    2. BHold and wait
    3. CNo preemption
    4. DCircular wait
    5. ERecursive wait
    6. FMutual Inclusion
  3. 3Deadlock Characterization

    [blank_start]Mutual exclusion[blank_end] - Only one process at a time can use a resource

    [blank_start]Hold and wait[blank_end] - A process holding at least one resource is waiting to acquire additional resources held by other processes

    [blank_start]No preemption[blank_end] - A resource can be released only voluntarily by the process holding it, after that process has completed its task

    [blank_start]Circular wait[blank_end] - There exists a set {P0, P1, ..., Pn} of waiting processes
    1. AMutual exclusion
    2. BHold and wait
    3. CNo preemption
    4. DCircular wait
  4. 4Rule of Thumb for Deadlock

    If graph contains no cycles = no deadlock

    If graph contains a cycle (closed cycle):
    if only one instance per resource type = Deadlock
    if several instances per resource type = Possibility of deadlock
    1. ARichtig
    2. BFalsch
  5. 5.Bild zu Frage 5
    1. AY
    2. B.
  6. 6.Bild zu Frage 6
    1. AY
    2. B.
  7. 7The deadlock-avoidance algorithm is based on resource-allocation state

    The # of available resources + allocated resources + maximum demands of the processes
    1. ARichtig
    2. BFalsch
  8. 8Safe State
    If a system is in safe state = no deadlocks
    If a system is in unsafe state = possibility of deadlock
    1. ARichtig
    2. BFalsch
  9. 9https://www.youtube.com/watch?v=w0LwGqffUkg

    Bankers Algorithm - Safety:

    1) Let Work and Finish be vectors of length ‘m’ and ‘n’ respectively.
    Initialize: Work = Available
    Finish[i] = false; for i=1, 2, 3, 4….n

    2) Find an i such that both
    a) Finish[i] = false
    b) Needi <= Work
    if no such i exists goto step (4)

    3) Work = Work + Allocation[i]
    Finish[i] = true
    goto step (2)

    4) if Finish [i] = true for all i
    then the system is in a safe state
    1. ARichtig
    2. BFalsch
  10. 10Bankers Algorithm - resource request

    1) If Requesti <= Needi
    Goto step (2) ; otherwise, raise an error condition, since the process has exceeded its maximum claim.

    2) If Requesti <= Available
    Goto step (3); otherwise, Pi must wait, since the resources are not available.

    3) Have the system pretend to have allocated the requested resources to process Pi by modifying the state as
    follows:
    Available = Available – Requesti
    Allocationi = Allocationi + Requesti
    Needi = Needi– Requesti
    1. ARichtig
    2. BFalsch

Informationen

Beschreibung
Computer Science Quiz am OS final, erstellt von Duncan Levings am 27/11/2019.
Sprache
English
Aufrufe
3
Schlagwörter
computer science
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck