Everything not on exam 1 and 2

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

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:53 AM on 5/3/24
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

20 Terms

1
New cards

Thread

This is a flow of execution, it has light weight processes and exists within a process. It shares resources like memory and open files

2
New cards

Ways you can create a thread of execution

  1. Write a class to extend the thread class

  2. Write a class that implements a runnable interface and tap it in a thread

3
New cards

Processes

A self contained execution environment, has its own memory and resources

4
New cards

What’s the difference between start and run

start allows threads to run concurrently while the run methods directly runs the threads syncronously

5
New cards

Join()

When a thread joins another , it is blocked until the the thread being joined on finishes. This technique is used when your thread depends on another thread

6
New cards

Wait()

causes the current thread to wait until another thread invokes the notify() method or notifyall()

7
New cards

Notify()

Wakes up a single thread that is waiting on this objects monitor.

8
New cards

Notifyall()

Wakes up all the threads are waiting on this objects

9
New cards

Java Thresd life cycle

  1. The thread constructor is called a new instance of the thread class

  2. The start merges is called to designate rhe thread as runnable

  3. The Java thread scheduler runs rhe thread as the processor becomes available

  4. The thread can be blocked for various reasons and will not run again until it is returned to the Runnable State

  5. If fhe thread calls the wait method, it is put into the waiting state and will remain their until another thread calls the notify or notify all method

  6. The thread ends when the run method terminates

10
New cards

Deadlock

This is a scenario where two or more threads are blocked indefinitely waiting for access to a critical resource.

11
New cards
12
New cards
13
New cards
14
New cards
15
New cards
16
New cards
17
New cards

Socket

One endpoint of a two-way communication link between two programs running on the network

18
New cards

Accept()

Calling accept on the server blocks the server until a client connects to the port

19
New cards

What Happens when a client connects to a server

It unblocks and gets back a client socket

20
New cards

Dr Ça