Multithreading & Concurrency

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/35

flashcard set

Earn XP

Description and Tags

Vocabulary-style flashcards covering the fundamental concepts of Java Multithreading, Concurrency, and Thread Management based on lecture notes.

Last updated 9:14 PM on 5/3/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

36 Terms

1
New cards

Process

A software program in execution with its own address space.

2
New cards

Thread

A smaller unit within a process, also known as a lightweight process, that represents a single sequential flow of control.

3
New cards

Main thread

The at least one thread that every software program possesses by default.

4
New cards

Resource utilization

The efficiency gained by allowing another program to run while a thread is waiting for external operations like input or output.

5
New cards

Time slicing

A fine-grained sharing method that allows multiple users and programs to have equal claims on a machine's resources.

6
New cards

New state

The phase in the thread life cycle where the thread is considered not alive.

7
New cards

Runnable (Ready-to-run) state

The state where a thread has started its life and is waiting for its turn on the processor.

8
New cards

Running state

The state in which the thread is currently executing.

9
New cards

Dead state

The state reached when a thread's run() method completes.

10
New cards

Blocked state

The state where a thread is waiting for resources that are currently held by another thread.

11
New cards

Thread.MIN_PRIORITY

The integer value 11 representing the minimum importance a thread can have.

12
New cards

Thread.MAX_PRIORITY

The integer value 1010 representing the maximum importance a thread can have.

13
New cards

Thread.NORM_PRIORITY

The integer value 55, which is the default priority level for a thread.

14
New cards

join()

A method called by one thread on another thread to wait for the second thread to complete before proceeding.

15
New cards

yield()

A hint provided through the yield() method that the currently executing thread is willing to pause and allow other threads to execute.

16
New cards

sleep()

A method that causes the currently executing thread to pause for a specified number of milliseconds without releasing its lock.

17
New cards

Interruption

A mechanism whereby a thread that is waiting or sleeping can be made to prematurely stop waiting.

18
New cards

Preemptive Threads

A threading model where a higher-priority thread can interrupt a currently running lower-priority thread to take CPU time.

19
New cards

Non-Preemptible Threads

A threading model where a running thread cannot be interrupted and runs until it voluntarily yields control or finishes its task.

20
New cards

Daemon Thread

A low-priority service provider thread, such as the Garbage collector, that provides background services as long as the program is running.

21
New cards

Monitor

An intrinsic locking mechanism in Java where every object has a lock that can be held by only one thread at a time.

22
New cards

Race Conditions

A concurrency issue where multiple threads modify shared data simultaneously, leading to unpredictable or inconsistent states.

23
New cards

Mutex

Short for Mutual Exclusive; a locking mechanism where only the thread that locks the mutex can unlock it to ensure exclusive access.

24
New cards

Semaphore

A signaling mechanism that controls access to a shared resource through a counter.

25
New cards

Binary Semaphore

A type of semaphore similar to a mutex that uses a counter value of 00 or 11.

26
New cards

Counting Semaphore

A type of semaphore that allows a specified number of threads to access a resource.

27
New cards

Rule zero of concurrent programming

never make any assumptions.

28
New cards

wait()

An Object class method that causes the calling thread to release its lock and wait until another thread invokes notify() or notifyAll().

29
New cards

Inter-Thread Communication (IPC)

A mechanism using wait(), notify(), and notifyAll() that allows threads to communicate without race conditions.

30
New cards

Deadlock

A situation where two or more threads are unable to proceed because each is waiting for the other to release a resource, resulting in a standstill.

31
New cards

Priority inversion

A scenario where a lower-priority thread holds a resource needed by a higher-priority thread, effectively reversing their importance.

32
New cards

Starvation

A condition where a thread is perpetually denied the resources it needs because other threads are continuously given preference.

33
New cards

Mutual Exclusion (Deadlock Condition)

One of the four necessary conditions for deadlock, requiring at least one resource to be held in a non-sharable mode.

34
New cards

Hold and Wait (Deadlock Condition)

A condition for deadlock where a thread holding at least one resource is waiting to acquire additional resources.

35
New cards

No Preemption (Deadlock Condition)

A condition for deadlock where resources cannot be forcibly taken from a thread that is holding them.

36
New cards

Circular Wait (Deadlock Condition)

A condition for deadlock where a set of threads exists such that each thread is waiting for a resource held by the next thread in the cycle.