Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

CS 354 EXAM STUDY GUIDE QUESTIONS WITH CORRECTLY SOLVED ANSWERS(GUARANTEED PASS)

Document preview thumbnail
Preview 2 out of 6 pages

CS 354 EXAM STUDY GUIDE QUESTIONS WITH CORRECTLY SOLVED ANSWERS(GUARANTEED PASS)

Content preview

CS 354 EXAM STUDY GUIDE QUESTIONS WITH CORRECTLY
SOLVED ANSWERS: GUARANTEED PASS



1) Name the sections of memory -- Answer ✔✔ Stack, Shared Libs, Heap, Bss, Data,
t t t t t t t t t t t t t t




Text

2) What goes in the text section of memory? -- Answer ✔✔ Instructions that the
t t t t t t t t t t t t t t




program runs t




3) Name the four features of a 3rd generation machine -- Answer ✔✔ Processor,
t t t t t t t t t t t t t




memory system, I/O devices, interrupts t t t t




4) Are virtual or physical addresses cached? -- Answer ✔✔ Virtual addresses
t t t t t t t t t t




5) What is the purpose of the interrupt mask? -- Answer ✔✔ It is a bitmask kept in the
t t t t t t t t t t t t t t t t t t




CPU status register to determine which interrupts are permitted
t t t t t t t t




6) In XINU, how are processes implemented? -- Answer ✔✔ Each process is a thread of
t t t t t t t t t t t t t t t




the main program
t t




7) In XINU, is the stack or heap shared? -- Answer ✔✔ The heap is shared, but each
t t t t t t t t t t t t t t t t t




process has its own stack t t t t




8) Threads within a process share these three things (and a 4th in XINU)... -- Answer
t t t t t t t t t t t t t t t




✔✔ text, data, and bss (and heap)
t t t t t t




9) Where is information about each process stored? -- Answer ✔✔ In the process table
t t t t t t t t t t t t t t




(or thread table)
t t




10) A process that is delayed for a specified time is in what state? -- Answer ✔✔ Sleeping
t t t t t t t t t t t t t t t t

, 11) A process that is not permitted to execute is in what state? -- Answer ✔✔ Suspended
t t t t t t t t t t t t t t t




12) Where are processes that are ready to execute stored? -- Answer ✔✔ In the
t t t t t t t t t t t t t t




readylist

13) What is XINU's scheduling policy? -- Answer ✔✔ Highest priority process gets the
t t t t t t t t t t t t t




CPU

14) When is the scheduling invariant enforced? -- Answer ✔✔ When the set of eligible
t t t t t t t t t t t t t t




processes changes, or the priority of any eligible process changes
t t t t t t t t t




15) What function swaps the currently running process? -- Answer ✔✔ ctxsw
t t t t t t t t t t




16) Why must ctxsw be written in assembly? -- Answer ✔✔ ctxsw has to save registers,
t t t t t t t t t t t t t t t




which is not possible in C
t t t t t




17) Which process executes the context switch code? -- Answer ✔✔ The old process
t t t t t t t t t t t t t




executes the first half of the context switch, then the new process continues
t t t t t t t t t t t t t




executing where previously suspended t t t




18) Which program executes if all user processes are idle? -- Answer ✔✔ The null
t t t t t t t t t t t t t t




process

19) How does a process end? -- Answer ✔✔ kill
t t t t t t t t




20) Name an advantage of a mutex implementation over test-and-set -- Answer ✔✔
t t t t t t t t t t t t




Mutex implementations avoid busy waiting
t t t t




21) No operating system function should contain code to explicitly ____ interrupts --
t t t t t t t t t t t t




Answer ✔✔ enable t t




22) How can blocking interrupts break the scheduling invariant? -- Answer ✔✔ A high-
t t t t t t t t t t t t




priority process may finish its I/O and be ready to run, but disabling interrupts
t t t t t t t t t t t t t t




prevents a context switch t t t

Document information

Uploaded on
January 23, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.59

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Topclass
5.0
(1)
Sold
2
Followers
0
Items
531
Last sold
1 year ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions