Article Directory
-
- What is a process? What is a thread? What is a coroutine? The connection and difference between the three?
- What is a zombie process? What is an orphan process?
- What is a daemon thread? What is the difference between a daemon thread and a user thread?
- How to find which thread has the highest cpu utilization on Windows and Linux?
- Talk about the difference between concurrency and parallelism?
- Why do multi-threaded (concurrent) programming? What are the disadvantages of multithreaded programming?
- Talk about the life cycle of the thread and the corresponding state? Which methods can be called in Java multithreading to switch to the next state?
- What is thread deadlock? How to avoid deadlock? Write a Java deadlock code?
- What is thread context switching?
-
- What are the ways to create threads in Java?
- What is the difference between runnable and callable?
- What is the difference between thread run() and start()? Isn't it okay to start a thread and call run()?
- What are Callable and Future?
- Talk about FutureTask?
- What is the thread scheduling algorithm used in Java? Thread scheduling strategy? What are Thread Scheduler and Time Slicing?
- What is the difference between sleep(), wait() and yield()?
- Why are the thread communication methods wait(), notify() and notifyAll() defined in the Object class?
- What is the purpose of the yield method in the Thread class? Why are the sleep() and yield() methods of the Thread class static?
- What is the difference between notify() and notifyAll()?
- What is the difference between interrupt(), isInterrupted() and interrupted() methods?
-
- Talk about JMM (Java Memory Model)?
- Do you know ThreadLocal? what's the effect? Do you know the principle? Have you encountered ThreadLocal memory leaks?
- What is instruction reordering? Do you know what happens-before? Do you know the semantics of as-if-serial?
- What is false sharing? How to avoid it?
-
- Optimistic and pessimistic locking
- Fair lock and unfair lock
- Exclusive lock and shared lock
- What is a reentrant lock
- What is a spin lock
- The lock upgrade process?
- What is CAS
- LockSupport
- Condition
-
voliate、synchronized、reentrantLock
- The voliate keyword and the realization principle of voliate?
- Synchronized lock and the underlying implementation principle of synchronized?
- The principle of reentrantLock and reentrantLock?
- What is the difference between reentrantLock and synchronized and voliate?
-
Concurrent container
-
Multi-threaded blocking queue (AQS)
-
- Thread pool parameters
- Thread pool rejection strategy
- Waiting queue (blocking queue)
-
- CountDownLatch
- CyclicBarrier
- Semaphore