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

CSE 445 Module 2 Questions with 100% Correct Answers

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
05-02-2025
Written in
2024/2025

CSE 445 Module 2 Questions with 100% Correct Answers What would happen if a "release" call is made when the semaphore count is at its max value? - Answer-An exception will occur. In a multithreading implementation of the Collatz conjecture, the efficiency exceeds 100%. The reason is the use of - Answer-different array sizes in different implementations. When designing a computer system, if you focus on improving one part of the system without you modifying the other part, the best performance law you can use is: - Answer-Amdahl's Law What technique can be used to make sure that parallel withdrawals from ATMs cannot exceed the given limit of a bank account? - Answer-Implement a lock mechanism to prevent simultaneous access to the account object. What is the proper way of creating a thread class if the class has already inherited members from another class? - Answer-Implement the Runnable Interface Which method is the starting point in a user-defined Java thread class? - Answer-run Compare and contrast wait( ) and sleep(t) methods defined in the library class Thread. - Answer-A thread in the wait state cannot return to the ready state unless another thread issues a notification. What is the best definition of the speedup of an N-core processor over a 1-core processor? - Answer-ExecutionTime of 1-core / ExecutionTime of N-core In what situations can a deadlock occur? Select all that apply - There are two shared resources. - There are more than two shared resources. - There is no shared resource. - There is one shared resource. - Answer-- There are two shared resources Ethernet's binary exponential backoff mechanism is a technique used for avoiding - Answer-livelock A thread - Answer-exists when the corresponding code is running Compare and contrast livelock and deadlock. What statement is correct? - Answer-In the case of deadlock, the resources are held. In the case of livelock, the resources are still free. How is the synchronization mechanism implemented in a Java environment? - Answer-A lock-bit in an object is set to "true" when a synchronized method accesses the object. If a method is prefixed with the keyword "synchronized", then - Answer-all objects accessed by the method will be locked during the execution of the method. Can Monitor.Enter(v) lock the variable v if v is of integer type? - Answer-No, Monitor.Enter(v) cannot directly lock the variables of value-type. Which method is the starting point in a user-defined C# thread class? - Answer-a user-named method

Show more Read less
Institution
CSE 445
Course
CSE 445









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

Written for

Institution
CSE 445
Course
CSE 445

Document information

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

Subjects

Content preview

CSE 445 Module 2 Questions with
100% Correct Answers

What would happen if a "release" call is made when the semaphore count is at its max
value? - Answer-An exception will occur.

In a multithreading implementation of the Collatz conjecture, the efficiency exceeds
100%. The reason is the use of - Answer-different array sizes in different
implementations.

When designing a computer system, if you focus on improving one part of the system
without you modifying the other part, the best performance law you can use is: -
Answer-Amdahl's Law

What technique can be used to make sure that parallel withdrawals from ATMs cannot
exceed the given limit of a bank account? - Answer-Implement a lock mechanism to
prevent simultaneous access to the account object.

What is the proper way of creating a thread class if the class has already inherited
members from another class? - Answer-Implement the Runnable Interface

Which method is the starting point in a user-defined Java thread class? - Answer-run

Compare and contrast wait( ) and sleep(t) methods defined in the library class Thread. -
Answer-A thread in the wait state cannot return to the ready state unless another thread
issues a notification.

What is the best definition of the speedup of an N-core processor over a 1-core
processor? - Answer-ExecutionTime of 1-core / ExecutionTime of N-core


In what situations can a deadlock occur? Select all that apply

- There are two shared resources.
- There are more than two shared resources.
- There is no shared resource.
- There is one shared resource. - Answer-- There are two shared resources

Ethernet's binary exponential backoff mechanism is a technique used for avoiding -
Answer-livelock

, A thread - Answer-exists when the corresponding code is running

Compare and contrast livelock and deadlock. What statement is correct? - Answer-In
the case of deadlock, the resources are held. In the case of livelock, the resources are
still free.


How is the synchronization mechanism implemented in a Java environment? - Answer-
A lock-bit in an object is set to "true" when a synchronized method accesses the object.

If a method is prefixed with the keyword "synchronized", then - Answer-all objects
accessed by the method will be locked during the execution of the method.

Can Monitor.Enter(v) lock the variable v if v is of integer type? - Answer-No,
Monitor.Enter(v) cannot directly lock the variables of value-type.

Which method is the starting point in a user-defined C# thread class? - Answer-a user-
named method

The C# monitor class's methods Monitor.Enter and Monitor.Exit can be used for -
Answer-synchronizing a set of statements, similar to the synchronized statements in
Java.

The lock(...) method in C# does not need to use try-finally exception handling, because -
Answer-exception handling is implied

A C# delegate (Select all that apply)
- allows a method name to be passed as a parameter.
- defines a semaphore for multiple threads.
- creates proxy to be associated with a remote service.
- allows the same method call to be associated with different method codes. - Answer--
allows a method name to be passed as a parameter
- allows the same method call to be associated with different method codes.

Coordination events in C# are used for - Answer-defining the order of execution among
the threads.

What would happen if a "WaitOne" request is called when the semaphore value is zero?
- Answer-The calling thread will be blocked

What is the efficiency of a multi-core computer? - Answer-Speedup / NumberOfCores

Which law should you use in evaluating the system performance improvement if you
have doubled the processor speed, and improved the other parts accordingly? -
Answer-Gustafson's Law

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.
Scholarsstudyguide nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
792
Member since
3 year
Number of followers
475
Documents
15431
Last sold
1 day ago
NURSING

Here you will find everything you need in nursing Assignments, EXAMS AND TESTBANKS. For students who want to see results twice as fast. I strive for my content to be of the highest quality. Always leave a review after purchasing any document so as to make sure our customers are 100% satisfied.

3.9

164 reviews

5
87
4
21
3
26
2
6
1
24

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