100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

CS370 EXAM LATEST UPDATED 2024 QUESTIONS WITH DETAILED ANSWERS

Rating
-
Sold
-
Pages
48
Grade
A+
Uploaded on
08-01-2025
Written in
2024/2025

CS370 EXAM LATEST UPDATED 2024 QUESTIONS WITH DETAILED ANSWERS What can be used to prevent busy waiting when a semaphore is implemented? - ANSWER-waiting queues -it's in the question For the Readers-Writers Problem, we saw the structure of a reader process. Assume that there is currently one reader process that is performing reading, and there are no other processes in the system. What happens if another reader process arrives? code: do { wait(mutex); read_count++; if (read_count == 1) wait(rw_mutex); signal(mutex); ... /* reading is performed */ ... wait(mutex); read count--; if (read_count == 0) signal(rw_mutex); signal(mutex); } while (true); - ANSWER-It will enter the section marked as "/* reading is performed */ " Monitors - ANSWER--A high-level abstraction that provides a convenient and effective mechanism for process synchro nization -one process at a time -for java, not c

Show more Read less
Institution
CS370
Course
CS370











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CS370
Course
CS370

Document information

Uploaded on
January 8, 2025
Number of pages
48
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CS370 EXAM LATEST UPDATED 2024 QUESTIONS
WITH DETAILED ANSWERS

What can be used to prevent busy waiting when a semaphore is
implemented? - ANSWER-waiting queues
-it's in the question


For the Readers-Writers Problem, we saw the structure of a reader
process. Assume that there is currently one reader process that is
performing reading, and there are no other processes in the system.
What happens if another reader process arrives?


code:
do {
wait(mutex); read_count++;
if (read_count == 1)
wait(rw_mutex);
signal(mutex);
...

,/* reading is performed */
...
wait(mutex);
read count--;
if (read_count == 0)
signal(rw_mutex);
signal(mutex);
} while (true); - ANSWER-It will enter the section marked as "/* reading is
performed */ "


Monitors - ANSWER--A high-level abstraction that provides a convenient
and effective mechanism for process synchronization
-one process at a time
-for java, not c


Monitors represent a theoretical concept that has been proposed which is
not encountered in modern programming languages. - ANSWER-false
-we use em and implement em

,context switch - ANSWER-saves the state of the currently running
process and restores the state of the next process to run


A process executing an atomic instruction cannot be context-switched
regardless of how much clock cycles it takes to complete that instruction.
- ANSWER-True
-something atomic cannot be switched according to definition


The term "mutex" is formed by combining "mutual exception" - ANSWER-
false (MUTual EXclusion)


A mutex can take any of the value -1, 0, 1 - ANSWER-false (0,1)


An "atomic instruction" refers to a an instruction in a high level language
such as C. - ANSWER-false


Why is the the mutex semaphore used in the implementation of the
bounded-buffer problem using semaphores? - ANSWER-It ensures mutual
exclusion. (MUtual EXclusion)

, When using mutex locks, which is the correct sequence for implementing
a critical section? - ANSWER-acquire() followed by release()


load balancing - ANSWER-Distributing a computing or networking
workload across multiple systems to avoid congestion and slow
performance.


Processor affinity - ANSWER-unbinding of a process or a thread to a CPU,
so that the process or thread will execute only on the designated CPU


We had seen that when using semaphores, a process invokes the wait()
operation before entering its critical section, and then the signal()
operation upon completion of its critical section. Consider reversing the
order of these two operations—first calling signal(), then calling wait().
What would be a possible outcome of this? - ANSWER-Several processes
could be active in their critical sections at the same time.


T/F The value of a counting semaphore can range only between 0 and 1. -
ANSWER-false
-counting semaphores are essentially integer variables

Get to know the seller

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.
BESTEXAMS Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
55
Member since
2 year
Number of followers
25
Documents
1026
Last sold
3 weeks ago

My mission is to be your LIGHT in a dark time. If you are anxious or struggling with EXAMS,In my page you will find latest Exams, Test Banks,Solutions Manual, Exam Elaboration, Discussions, Case Studies,Essays etc. I upload quality and verified documents at an affordable price. Help others to benefit from this study materials by leaving a review, SUCCESS.I really want my notes to be your GUIDE!!! I know these helped countless others pass and that is all I want for YOU! I have a ""Love It"" GUARANTEE A+!

Read more Read less
4.2

19 reviews

5
6
4
11
3
2
2
0
1
0

Recently viewed by you

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

Frequently asked questions