Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CS 354 MIDTERM EXAM STUDY GUIDE QUESTIONS WITH ANSWERS

Beoordeling
-
Verkocht
-
Pagina's
10
Cijfer
A+
Geüpload op
23-01-2025
Geschreven in
2024/2025

CS 354 MIDTERM EXAM STUDY GUIDE QUESTIONS WITH ANSWERS

Instelling
CS 354
Vak
CS 354

Voorbeeld van de inhoud

CS 354: MIDTERM EXAM STUDY GUIDE QUESTIONS WITH
ANSWERS.



1) Why do we use XINU? -- Answer ✔✔ It is small, complete, elegant, powerful, and
t t t t t t t t t t t t t t t




practical. We can also run it on real hardware, which gets rid of any work done by
t t t t t t t t t t t t t t t t t




VM.

2) What is an operating system? -- Answer ✔✔ It provides an abstract computing
t t t t t t t t t t t t t




environment, supplies services, manages resources, hides low-level hardware.
t t t t t t t




3) What is the equation of context switch overhead? -- Answer ✔✔ Xoverhd% =
t t t t t t t t t t t t t




100*(X/T) where X is cntxsw time and T is quantum time.
t t t t t t t t t t




4) Why are CPU bursts important? -- Answer ✔✔ Help us decide on quantum length.
t t t t t t t t t t t t t t




90% of CPU bursts are smaller than 10 ms, which is crucial to consider.
t t t t t t t t t t t t t




5) What is an adaptive scheduling policy? -- Answer ✔✔ Changing policy based on past
t t t t t t t t t t t t t t




behavior. This normally works because programs have predictable behavior.
t t t t t t t t




6) What is shortest job first? -- Answer ✔✔ Run whatever job has the least amount of
t t t t t t t t t t t t t t t t




computation to do (have to know future). t t t t t t




7) What is shortest remaining time first? -- Answer ✔✔ Preemptive version of SJF:
t t t t t t t t t t t t t




requires knowledge of future and run times.
t t t t t t t




Can lead to starvation if many small jobs are queued, leaving large jobs in the back.
t t t t t t t t t t t t t t t




Pros: Optimal (average response time)
t t t t




Cons: Hard to predict future, unfair
t t t t t

, 8) What are the benefits and challenges of SJF/SRTF? -- Answer ✔✔ They are vest at
t t t t t t t t t t t t t t t




minimizing average completion time. However, you have to be able to accurately
t t t t t t t t t t t t




predict future. t




If all jobs are same length: Just like FCFS
t t t t t t t t




9) What is a multilevel feedback queue? -- Answer ✔✔ It is another method for
t t t t t t t t t t t t t t




exploiting past behavior. Multiple queues each with different priorities and scheduling
t t t t t t t t t t t




algorithms. As time goes on, you can change the priority to move it to different
t t t t t t t t t t t t t t t




queues.

10) What is the fairness tradeoff? -- Answer ✔✔ Fairness gained by hurting completion
t t t t t t t t t t t t t




response time. We could give each queue some fraction of the CPU, or increase
t t t t t t t t t t t t t t




priority of jobs that don't get service.
t t t t t t




11) What is scheduling? What are the key steps? -- Answer ✔✔ It is a fundamental part of
t t t t t t t t t t t t t t t t t




process management, performed by the OS. Three steps: Examine processes that are
t t t t t t t t t t t t




eligible, select a process, switch to selected process.
t t t t t t t




12) How is scheduling implemented? -- Answer ✔✔ We need to pick a scheduling policy
t t t t t t t t t t t t t t




that specifies which process to select. Then, we must build one that selects the
t t t t t t t t t t t t t t




process, updates the process table, and calls context switch.
t t t t t t t t




13) What is the scheduling process in XINU? -- Answer ✔✔ Each process is assigned a
t t t t t t t t t t t t t t t




priority, which is a non-negative integer value. The scheduler always chooses to run
t t t t t t t t t t t t t




an eligible process with the highest priority.
t t t t t t




14) What is the XINU scheduling invariant? -- Answer ✔✔ At any time, the processor
t t t t t t t t t t t t t t




must be executing a highest priority eligible process. Among processes with equal
t t t t t t t t t t t t




priority, scheduling is round robin. t t t t




This must be enforced when the set of processes changes, and the priority changes
t t t t t t t t t t t t t t




(only within syscalls or interrupts.
t t t t




15) What is deferred rescheduling? How is it implemented? -- Answer ✔✔ It delays the
t t t t t t t t t t t t t t




enforcement of the scheduling invariant. We use it by accessing t t t t t t t t t t

Geschreven voor

Instelling
CS 354
Vak
CS 354

Documentinformatie

Geüpload op
23 januari 2025
Aantal pagina's
10
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$10.89
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
Topclass
5.0
(1)

Maak kennis met de verkoper

Seller avatar
Topclass Chamberlain College Of Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2
Lid sinds
1 jaar
Aantal volgers
0
Documenten
531
Laatst verkocht
11 maanden geleden

5.0

1 beoordelingen

5
1
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen