CS313 Easy Guide: Exam Checklist Explained for Beginners

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

These flashcards cover key concepts related to processes, threads, liveness, synchronization, concurrent programming, and testing in Java.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

What is the primary difference between a process and a thread?

A process runs independently and has its own memory, while a thread is a smaller unit within a process that shares memory with other threads in the same process.

2
New cards

In Java, what does a process represent?

A running JVM instance.

3
New cards

What is the state of a thread when it is created but not started?

NEW.

4
New cards

What are the possible states of a thread in Java?

NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING, or TERMINATED.

5
New cards

What happens when a thread enters the BLOCKED state?

The thread is waiting to acquire a lock.

6
New cards

What is liveness in the context of programming?

Liveness refers to the condition where things keep working in a program.

7
New cards

What is deadlock?

A situation where two threads wait forever for each other.

8
New cards

What is a Critical Section in multi-threading?

The part of code where shared data is changed.

9
New cards

What is the purpose of synchronization in multi-threading?

To ensure that threads take turns when accessing shared data to avoid inconsistencies.

10
New cards

What is a Producer/Consumer pattern?

A pattern where one thread puts data into a shared buffer while another thread takes it out.

11
New cards

What does the 'Callable' interface do in Java?

Similar to Runnable, but it can return a result or throw an error.

12
New cards

What is Mutation Testing?

A technique where small changes are made to the code to see if tests can detect them, helping to improve test coverage and reveal hidden problems.

13
New cards

What is atomicity in multi-threading?

An operation is atomic if it is indivisible, meaning it either happens completely or not at all.

14
New cards

What is ThreadMXBean in Java?

A part of the Java Management Extensions (JMX) API that provides detailed monitoring and management of threads in the JVM.