Concurrent Programming ICT - 59 Flashcards

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

1/58

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards defining core concepts, thread states, mechanisms, synchronizers, and executor utilities in concurrent programming.

59 Terms

1
New cards

Process

A program in execution with its own memory and resources.

2
New cards

Sub-process

A process created by another process to perform a task.

3
New cards

Thread

A unit of execution within a process that shares process memory.

4
New cards

Concurrency

Multiple tasks make progress during overlapping periods.

5
New cards

Parallelism

Multiple tasks execute at exactly the same time.

6
New cards

Synchronous action

An action that participating processes must coordinate and perform together.

7
New cards

Determinism

The same initial conditions and inputs produce the same observable result.

8
New cards

Interference

One thread affects another through shared data.

9
New cards

Race condition

The result depends on the timing or order of concurrent operations.

10
New cards

Deadlock

Threads are permanently waiting for resources held by each other.

11
New cards

Starvation

A thread waits indefinitely while others repeatedly get the resources.

12
New cards

Critical section

Code accessing shared resources that needs protection.

13
New cards

Mutual exclusion

Only one thread at a time enters a particular critical section.

14
New cards

Thread class

A Java class extended to create a thread by overriding run().

15
New cards

Runnable interface

Defines a task that can be executed by a thread.

16
New cards

start() vs run()

start(): starts a new thread. run(): ordinary call on the current thread.

17
New cards

Thread priority

A scheduling hint indicating relative importance from 1 to 10.

18
New cards

Daemon thread

A background thread that does not prevent the JVM from exiting.

19
New cards

Thread group

A collection of threads organised for management.

20
New cards

NEW

Thread object created but start() not called.

21
New cards

RUNNABLE

Thread ready to run or currently executing.

22
New cards

BLOCKED

Thread waiting to acquire an intrinsic monitor lock.

23
New cards

WAITING

Thread waiting indefinitely for another thread action.

24
New cards

TIMED_WAITING

Thread waiting for a specified maximum time.

25
New cards

TERMINATED

Thread has finished execution.

26
New cards

Synchronisation

Coordinating threads to control access to shared resources.

27
New cards

Monitor

A mechanism combining a lock and condition waiting to coordinate shared state.

28
New cards

Lock

A mechanism controlling access to protected code.

29
New cards

synchronized

Uses an object monitor lock to ensure mutual exclusion.

30
New cards

Atomic operation

An operation that appears to execute in one indivisible step.

31
New cards

Semaphore

Controls access to shared resources using permits.

32
New cards

Binary semaphore

A semaphore with at most one available permit.

33
New cards

Counting semaphore

A semaphore allowing multiple permits.

34
New cards

Mutex

An exclusive lock that must be unlocked by its owner.

35
New cards

acquire()

Obtains a semaphore permit; blocks if none is available.

36
New cards

release()

Returns a permit to the semaphore.

37
New cards

tryAcquire()

Tries to obtain a permit without blocking by default.

38
New cards

Fairness

Giving waiting threads a fair chance to access resources.

39
New cards

wait()

Releases the object monitor and waits for notification or interruption.

40
New cards

notify()

Wakes one thread waiting on the same object monitor.

41
New cards

notifyAll()

Wakes all threads waiting on the same object monitor.

42
New cards

Readers-writers problem

Multiple readers can read together; writers need exclusive access.

43
New cards

CountDownLatch

Allows threads to wait until a counter reaches zero; not reusable.

44
New cards

CyclicBarrier

Fixed number of threads wait for each other; reusable.

45
New cards

Phaser

Coordinates threads through phases with flexible registration.

46
New cards

Exchanger

Lets two threads meet and exchange objects.

47
New cards

ExecutorService

Manages task execution and supports shutdown and Future.

48
New cards

Thread pool

A set of reusable worker threads executing tasks.

49
New cards

Fixed thread pool

A pool with a fixed number of worker threads.

50
New cards

Cached thread pool

Creates threads as needed and reuses idle threads.

51
New cards

Callable

A task that returns a result and may throw checked exceptions.

52
New cards

Future

Represents the result of an asynchronous computation.

53
New cards

Future.get()

Gets a task result, waiting if it is not yet available.

54
New cards

Future.isDone()

Checks whether a task has completed, failed or been cancelled.

55
New cards

Future.cancel()

Attempts to cancel a task.

56
New cards

Future.isCancelled()

Checks whether the task was successfully cancelled.

57
New cards

sleep() vs join()

sleep(): pause current thread. join(): wait for another thread to finish.

58
New cards

execute() vs submit()

execute(): runs task, no Future returned. submit(): returns Future.

59
New cards

shutdown() vs shutdownNow()

shutdown(): finish queued tasks. shutdownNow(): attempts immediate stop.