concurrent

basis

  • What are threads and processes?

  • 2. Describe the relationship between threads and processes, their differences, advantages and disadvantages.

    • 2.1. Diagram the relationship between process and thread?
    • 2.2. Why are program counters thread private?
    • 2.3. Why are vm stacks and local method stacks private?
    • 2.4. The role of heap and method area?
  • 3. What is the difference between parallelism and concurrency?

  • 4. Why multithreading?

  • 5. What are the problems with using multiple threads?

  • Thread life cycle and state?

  • 7. What is context switching?

  • What is a thread deadlock? How to avoid it?

  • What are the similarities and differences between sleep() and wait()?

  • 10, why start() to call run(), not run() directly?

The advanced

  • 1. Sychronized keyword

    • 1.1. What is your understanding of the keyword sychronized?
    • 1.2. Is there anything sychronized? How does it work?
    • 1.3. The underlying principle of sychronized?
    • 1.4. What are the optimizations after JDK1.6?
    • 1.5. Are sychnorized and ReentrantLock similar?
    • 1.6. What is the difference between sleep(), join (), yield ()?
    • 1.7. Difference between Synchronized and Lock?
    • 1.8 double check lock in singleton mode
  • 2. Volatile keyword

    • 2.1. What is your understanding of volatile?
    • 2.2. What is the difference between volatile and sychronized?
    • 2.3. Write a scenario where volatile is used instead of Synchronize
  • 3, ThreadLocal

    • 3.1. What is ThreadLocal?
    • 3.2. Examples of ThreadLocal?
    • 3.3, ThreadLocal principle?
    • 3.4, ThreadLocal memory leak problem?
  • 4. Thread pools

    • 4.1. What is a thread pool?
    • 4.2. What are the benefits of thread pools?
    • 4.3 What are the parameters of the thread pool? What does it do?
    • 4.4. What are the ways of threading?
    • 4.5 What is the difference between Runnable() and Callable?
    • 4.6 How to perform excute() and submit()
    • 4.7 How many ways to create a thread pool?
    • 4.8. Executor Framework
      • 4.8.1. What is Executor
      • 4.8.2 What are the three parts of Executor? (Tasks (Runable and Callable), task execution (Executor), calculated results (Future))
    • 4.9 Schematic diagram of Executor framework use
    • 4.10. Introduction to ThreadPoolExecutor
      • 4.10.1 ThreadPoolExecitor Analysis
      • 4.10.1 It is recommended to create a thread pool using ThreadPoolExcutor
    • 4.11. Examples of Using ThreadPoolExecutor
      • 4.11.1、Runnable + ThreadPoolExecutor
      • 4.11.2、Callable + ThreadPoolExecutor
      • 4.11.3. Difference between execute() and submit()
      • 4.11.4 Difference between Shutdown () and shutdowmNow()
      • 4.11.5 isTerminated and isShutdown(
  • An Atomic class

    • 5.1. What is Atomic
    • 5.2. Four atomic classes in JUC?
    • 5.3. A brief description of the AtomicInteger class
    • 5.4. A brief description of the AtomixInteger class
  • 6, AQS

    • 6.1 What is AQS?
    • 6.2 Principle of AQS
      • 6.2.1 AQS principle summary
      • 6.2.2 AQS resource sharing method
      • 6.2.3 Touch board components used at the bottom of AQS
    • 6.3 AQS Summary
  • 7, principle

    • 7.1. Talk about CountDownLatch
    • 7.2. CyclicBarrier principle
    • 7.3. Semaphore principle
    • 7.4 Talk about the recovery mechanism
    • 7.5. Tell us the difference between CountDownLatch and CyclicBarrier
  • 8. What are the types and differences of blocking queues?

  • 9, the Lock

    • 9.1. Lock underlying implementation
    • 9.2. Specific usage of Lock
  • Optimistic lock and pessimistic lock

    • 10.1. What is pessimism lock
    • 10.2. What is optimistic Lock
    • 10.3. What is the difference between the two
    • 10.4 Application Scenarios
    • 10.5 Two common implementation mechanisms for optimistic locking
      • 10.5.1 Version Number
      • 10.5.2 CAS algorithm
    • 10.6. What are the disadvantages of CAS algorithm
      • 10.6.1 ABA problems
      • 10.6.2 High cycle time overhead
      • 10.6.3. Only one shared atomic variable can be guaranteed
    • 10.7 CAS vs. Sychronized
  • 11. Concurrent containers provided by the JDK

    • 11.1. What are they? Role?
    • 11.2, concurrentHashMap
      • 11.2.1 Differences between concurrentHashMap and Hashable
      • 11.2.2 Difference between Concurrent and hashMap
      • 11.2.3. Bottom layer of concurrentHashMap
    • 11.3, CopyAndWriterArrayList
      • 11.3.1, introduction,
      • 11.3.2, principle
      • 13.3.3 Source code analysis
    • 11.4, concurrentLinkedQueue
    • 11.5, BlockingQueue
      • 11.5.1, briefly
      • 11.5.2, ArrayBlockingQueue
      • 11.5.3, LinkedBlockingQueue
      • PriorityBlocking
    • 11.6, concurrentListMap
  • 12, How to select a thread pool for a high-concurrency minimal task? What about tasks of varying lengths? (Custom task queue)

  • How does multithreading control synchronization