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 1 out of 2 pages
Exam (elaborations)

CSCI 3120 Chapter 6 Part 2 Final Exam Questions 100% Well Answered.

Document preview thumbnail
Preview 1 out of 2 pages

Hardware could be utilized to solve the critical section problem, three forms of hardware solutions include: - Answer 1. Memory Barriers 2. Hardware Instructions 3. Atomic variables Hardware based solutions to the critical section problem are complicated as well as - Answer generally inaccessible to application programmers Mutex Lock - Answer A process must acquire the lock before entering a critical section; it them releases the lock when it exits the critical section aquire() - Answer aquires the lock release() - Answer releases the lock Only if a lock is available - Answer a call to acquire() succeeds A process that attempts to acquire a unavailable lock - Answer is blocked until the lock is released Spinlocks are nice because - Answer we dont need to do a context switch when a process must wait on a lock, we can just spin until the lock becomes available A semaphore S is an integer variable that, apart from initialization, is accessed - Answer only through two indivisible (atomic) operations: wait() and signal() Two types of semaphores - Answer Binary Semaphore (similar to mutex lock) - int range from 0 to 1 Counting semaphore - int 0 to N Counting semaphores can be used to - Answer control access to a finite number of resources Wait() does what - Answer used when process wishes to use resource, decrements the semaphore

Content preview

CSCI 3120 Chapter 6 Part 2 Final Exam
Questions 100% Well Answered.
Hardware could be utilized to solve the critical section problem, three forms of hardware
solutions include: - Answer 1. Memory Barriers

2. Hardware Instructions

3. Atomic variables



Hardware based solutions to the critical section problem are complicated as well as - Answer
generally inaccessible to application programmers



Mutex Lock - Answer A process must acquire the lock before entering a critical section; it them
releases the lock when it exits the critical section



aquire() - Answer aquires the lock



release() - Answer releases the lock



Only if a lock is available - Answer a call to acquire() succeeds



A process that attempts to acquire a unavailable lock - Answer is blocked until the lock is
released



Spinlocks are nice because - Answer we dont need to do a context switch when a process must
wait on a lock, we can just spin until the lock becomes available



A semaphore S is an integer variable that, apart from initialization, is accessed - Answer only
through two indivisible (atomic) operations: wait() and signal()



Two types of semaphores - Answer Binary Semaphore (similar to mutex lock) - int range from
0 to 1

Counting semaphore - int 0 to N

Document information

Uploaded on
May 13, 2025
Number of pages
2
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

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
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
COCOSOLUTIONS
4.2
(37)
Sold
220
Followers
16
Items
9308
Last sold
1 week 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