Threads in java

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

1/33

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:36 PM on 5/28/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

34 Terms

1
New cards

Multithreading

Running multiple threads concurrently within a program

2
New cards

Thread

sequence of instructions in a process

3
New cards

Process

A program in execution with its own memory space

4
New cards

Concurrency

Managing multiple tasks at once (not necessarily parallel)(each thread execution is seperated to others threads execution

<p>Managing multiple tasks at once (not necessarily parallel)(each thread execution is seperated to others threads execution</p>
5
New cards

Parallelism

Executing multiple tasks simultaneously on multiple cores

<p>Executing multiple tasks simultaneously on multiple cores</p>
6
New cards

Thread class

Class used to create a thread by extending it

7
New cards

interrupt

doesn’t stop a thread ,it sends an interrupt request, to support the request we should check it

8
New cards

Runnable interface

Interface to define a task for a thread (run method)

9
New cards

run()

Method containing code executed by a thread

10
New cards

start()

Method that starts a new thread and calls run()

11
New cards

Thread lifecycle

New, Runnable, Running, Blocked/Waiting, Terminated

12
New cards

sleep()

Pauses a thread for a specified time

13
New cards

join()

makes a thread Wait for another thread to finish execution(block the current thread untilthe other has finished)

14
New cards

yield()

Hints scheduler to give other threads a chance

15
New cards

Daemon thread

Background thread that runs until all user threads finish

16
New cards

User thread

Thread that keeps JVM running

17
New cards

Synchronization

Controlling access to shared resources to avoid conflicts

18
New cards

synchronized keyword

Locks a method or block for thread-safe execution

19
New cards

Critical section

Code accessing shared resources

20
New cards

Race condition

Multiple threads competing to modify shared data causing inconsistency

21
New cards

Deadlock

Threads waiting indefinitely for each other’s resources

22
New cards

Livelock

Threads keep responding but make no progress

23
New cards

Thread safety

Code that works correctly with multiple threads

24
New cards

wait()

Makes thread wait and releases lock

25
New cards

notify()

Wakes one waiting thread

26
New cards

notifyAll()

Wakes all waiting threads

27
New cards

volatile keyword

Ensures visibility of shared variables across threads

28
New cards

Atomic operations

Operations completed without interruption

29
New cards

Executor framework

Manages thread pools and task execution

30
New cards

Thread pool

Group of reusable threads for efficiency

31
New cards

Callable interface

Like Runnable but returns a result

32
New cards

Future object

Holds result of asynchronous computation

33
New cards

Lock

methodes: lock; unlock

34
New cards

volatile

volatile key-word guarantees the change to a field is visible accross threads