100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CSE 445 Module 2 Questions with 100% Correct Answers

Beoordeling
-
Verkocht
-
Pagina's
5
Cijfer
A+
Geüpload op
05-02-2025
Geschreven 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

Meer zien Lees minder
Instelling
CSE 445
Vak
CSE 445









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
CSE 445
Vak
CSE 445

Documentinformatie

Geüpload op
5 februari 2025
Aantal pagina's
5
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

Voorbeeld van de inhoud

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

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Scholarsstudyguide nursing
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
792
Lid sinds
3 jaar
Aantal volgers
475
Documenten
15431
Laatst verkocht
1 dag geleden
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 beoordelingen

5
87
4
21
3
26
2
6
1
24

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen