Practical Java high Concurrency programming 1

Source: Internet
Author: User

Important Concepts

  1. Synchronous (synchronous) and asynchronous (asynchronous)
    • Synchronous Wait method returns
    • Asynchronously returns, continuing the next call
  2. Concurrency (Concurrency) and parallelism (Parallelism)
    • Concurrency is consistent with parallel external performance
    • Single-core CPUs cannot be parallelized, but can handle parallel transactions
  3. Critical section
    • Public resources or shared data
    • Critical section data corruption may occur when accessing multiple threads
  4. Blocking (Blocking) and non-blocking (non-blocking)
    • Non-blocking allows multiple threads to enter the critical section at the same time
  5. Deadlock (Deadlock), hunger (starvation) and live lock (Livelock)
    • Deadlock cannot stop service, static problem. Cyclic dependency
    • Live lock Dynamic Lock, run-time resource requisition
    • Hunger is lacking in certain resources and is always impossible to enforce

Concurrency level

  1. Blocking
  2. Non-blocking
    1. Barrier-Free
    2. No lock
    3. No wait

Amdahl Law (Amdahl Law)

Acceleration ratio Definition:

Acceleration ratio = System time-consuming/optimized system time before optimization

Gustafson Law (Gustafson)

Practical Java high Concurrency programming 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.