Concurrency_Quiz1

Concurrency_Quiz1

12 Qs

quiz-placeholder

Similar activities

Engineering Quiz - August - Hazardous Energy Control

Engineering Quiz - August - Hazardous Energy Control

University - Professional Development

10 Qs

Post-Test: Xero

Post-Test: Xero

Professional Development

10 Qs

5.0 - Soalan (Kadet) - Lain-lain Ciri Keselamatan

5.0 - Soalan (Kadet) - Lain-lain Ciri Keselamatan

University - Professional Development

12 Qs

Machinist Grinder 4th Sem - NSQF - Module 4 : Thread grinding

Machinist Grinder 4th Sem - NSQF - Module 4 : Thread grinding

Professional Development

16 Qs

Lab Quiz on Semaphores and Banker's Algorithm

Lab Quiz on Semaphores and Banker's Algorithm

University

8 Qs

Java Quiz

Java Quiz

KG - Professional Development

8 Qs

LOTO (PECTH)

LOTO (PECTH)

Professional Development

10 Qs

FUN 101 Week 4

FUN 101 Week 4

University

13 Qs

Concurrency_Quiz1

Concurrency_Quiz1

Assessment

Quiz

Professional Development

Easy

Created by

Polina M

Used 5+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a thread?

A set of instructions loaded into memory.

A security mechanism used to control access to shared resources.

A unit of execution within a process.

A running program.

2.

MATCH QUESTION

1 min • 1 pt

Match the following

Processor

Instance of a running program.

Amit Chopra

Media Image

Thread

A set of instructions to be executed.

Program

Hardware component that executes instructions.

Process

The smallest unit of execution within a process.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the methods a lock should have?

wait(), signal()

acquire(), release()

start(), exit()

lock(), unlock()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the Semaphore's count represent?

Total number of threads that can be created.

Number of locks a thread can have.

Number of permits to enter a critical section available.

Number of total critical section accesses allowed.

5.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which are TRUE about Spinlocks?

Resource intensive.

Effective for small critical sections.

Allow multiple threads to access a critical section.

Do not require a context switch as the thread never sleeps (just like us).

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What causes a Race Condition?

Two or more threads accessing a shared resource at the same time.

Mismatched data types in a program.

Creating multiple threads at the same time within a process.

Operating System scheduler.

7.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Consider the following psuedocode:

lock.acquire()

Critical section (some piece of code)

lock.release()

Which of the following statements are true?

The critical section cannot be executed by any thread.

Whenever a thread acquires the lock, the number of permits available is decremented.

The critical section is atomic.

Mutual exclusion of threads is guaranteed in the critical section.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?