Session 10

Session 10

University

7 Qs

quiz-placeholder

Similar activities

Java Quiz

Java Quiz

University

10 Qs

OS Day 4

OS Day 4

University

10 Qs

OPESSYS: Module 3 Quiz Game

OPESSYS: Module 3 Quiz Game

University

11 Qs

Recap - Programming Languages

Recap - Programming Languages

University

10 Qs

CMP128 Java Ch. 01 Intro PC & Java

CMP128 Java Ch. 01 Intro PC & Java

University

10 Qs

Java

Java

University

10 Qs

React-Native Mastermind Challenge

React-Native Mastermind Challenge

University

10 Qs

Threads and Processes

Threads and Processes

University

9 Qs

Session 10

Session 10

Assessment

Quiz

Computers

University

Medium

Created by

Rafael Wampfler

Used 13+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why are locks not enough in some situations?

They can't always guarantee mutual exclusion.

They don't allow threads to communicate about changes in the state.

We can only use one lock at a time.

They are too boring.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A semaphore and a barrier are functionally the same.

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How do we prevent processes from "overtaking" other processes in a reusable barrier? (without breaking it)

By taking "if (count==n)" out of the mutex

This is not possible with just semaphores

By using a two-phase barrier

By using fewer than n processes

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A Java ReentrantLock has a monitor associated with it.

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is not a thread state in Java?

TERMINATED

TIMED_WAIT

BLOCKED

LOCKED

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When a thread is in the WAITING state and receives a notify, it goes into which state?

RUNNABLE

BLOCKED

RUNNING

READY

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Only one thread at a time can own an object's monitor (in Java).

True

False

Discover more resources for Computers