09 Concurrency Flashcards

1
Q

It contains two or more parts that can run concurrently.

A

Multithreaded program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It allows tasks waiting for other resources to give way to other processing requests.

A

multithreading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

It is the smallest unit of execution that can be scheduled by the operating system

A

thread

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

It is a group of associated threads executed in the same shared environment.

A

process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

It contains exactly one thread.

A

single-threaded process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

It supports more than one thread.

A

multithreaded process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

It is where threads in the same process share the same memory space and can communicate directly with one another.

A

Shared environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

It is the property of executing multiple threads and processes simultaneously.

A

Concurrency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

OS uses this to determine which threads should be currently executing.

A

Thread scheduler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It is the process of storing a thread’s current state and later restoring the state of the thread to continue execution.

A

context swtich

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

It is a special method created by the Java VM to run your application.

A

main thread

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the two (2) ways you can create a thread?

A

Extend the Thread class and override the run() method.
Implement the Runnable interface.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

It consists of several methods that allow you to manage threads.

A

Thread class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the methods of the Thread class? (9)

A

start()
run()
setName()
getName()
setPriority()
getPriority()
isAlive()
join()
sleep()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

It is a numeric value associated with a thread that is taken into consideration by the thread scheduler when determining which threads should currently be executing.

A

thread priority

How well did you know this?
1
Not at all
2
3
4
5
Perfectly