1. Java Concept Matching.
- blocked
- prevented from running when it is waiting for some kind of I/O operation to complete
- ready
- waiting for the CPU to become available.
- priority scheduling
- scheduling threads according to relative priority. Higher priority threads get the CPU first
- round-robin scheduling
- threads of the same priority take turns using the CPU with each thread getting a fixed amount (quantum) of time.
- producer
- a thread that produces a resource and acts like a source
- consumer
- a thread that uses a resource and acts like a sink
- monitor
- a mechanism that guarantees mutually exclusive access to a synchronized method among a group of cooperating threads.
- lock
- a mechanism to prevent other threads from using an objects synchronized methods
- concurrent
- having multiple threads sharing a CPU over a period of time
- time slicing
- a method of sharing the cpu between threads by giving each thread a small amount of the CPU’s time.
- busy waiting
- when the CPU is in a trivial loop for a fixed amount of time to delay a thread’s progress
- nonbusy waiting
- a thread gives up the CPU to another thread while waiting for an event or condition to occur.
- mutual exclusion
- among a group of threads, one and only one thread has access to a certain resource at a time.
- critical section
- a part of code that should be executed in a mutually exclusive manner by a group of threads.
Match each of the following Thread concepts.