100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COP 4600 Threading Exam Questions And Answers (A+) $11.99   Add to cart

Exam (elaborations)

COP 4600 Threading Exam Questions And Answers (A+)

 5 views  0 purchase
  • Course
  • COP 4600 Threading
  • Institution
  • COP 4600 Threading

COP 4600 Threading Exam Questions And Answers (A+)...

Preview 2 out of 6  pages

  • November 18, 2024
  • 6
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • COP 4600 Threading
  • COP 4600 Threading
avatar-seller
Easton
COP 4600 Threading Exam Questions And Answers (A+)



Thread - ANSWER a new abstraction for running a single process



PC and registers - ANSWER two things that each thread has their own resource of



thread-control blocks TCB - ANSWER blocks needed to store state of each thread



critical section - ANSWER a piece of code that accesses a shared variable and must not
be concurrently executed by more than one thread



race condition - ANSWER multiple threads executing a critical section at the same time



atomicity - ANSWER state of being indivisible; execution of instructions in which
instructions are seemingly executed all at once because they cannot be interrupted by
another thread



mutual exclusion - ANSWER only one process at a time can use a resource



locks - ANSWER hardware that ensures that any critical section executes as if it were an
atomic instruction



mutual exclusion, fairness, performance - ANSWER three things that ensures a good
lock



hardware - ANSWER one of the two components required for a lock that ensures atomic
execution

, operating system - ANSWER one of the two components required for a lock that keeps
tracks of the threads waiting and ensures FIFO



controlling interrupts - ANSWER one implementation method for mutual exclusion in a
single processor system and can be abused to hog the CPU

test-and-set/atomic exchange - ANSWER a method of attempting to acquire lock where
you swap out the old flag value for a new flag value, and return the old flag value to
determine whether lock is available



compare-and-swap - SOLUTION a manner of attempting to acquire lock in which you
compare the value of the flag value with its expected value. If the values are equal then
replace old flag value with new flag value and return old flag value.



load-linked and store-conditional - SOLUTION a method to try and acquire lock where
you first check if the flag is available using first routine, then you check if pointer has
been marked updated since the last routine was called and if so, update pointer and
return 1.



fetch-and-add - SOLUTION a method of attempting to get lock where you increment flag
value and return old value of flag



ticket lock - ANSWER a method of attempting to acquire lock in which you would
implement fetch-and-add. call fetch-and-add to obtain ticket number, and acquire lock
when turn matches tucket



test-and-set, compare-and-swap, load-linked and store-conditional, fetch-and-add,
ticket - ANSWER 5 methods of attempting to acquire a lock



spinning - ANSWER wasting an entire time slice doing nothing but polling a value



yield and queue - ANSWER two solutions to spinning

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Easton. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $11.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

62890 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$11.99
  • (0)
  Add to cart