JAVA Mind Map Series: Multithreading primary __java

Source: Internet
Author: User
Tags add time

Feel the Java Foundation is too bad, look again, the way the mind map to record


Multithreading Beginner





Process Independence have independent resources a separate address no authorization other processes cannot access of Dynamic the difference from the program is that the process is a dynamic set of instructions, and the program is a static set of instructions . Add time Concept have their own life cycle and different states of concurrency multiple processes can be executed concurrently on a single core processor multiple processes do not affect and parallelism: parallelism is the same time multiple processes execute concurrently on multiple processors concurrency means that at the same time only one instruction can be executed, but the switch is rapid, the macroscopic view is to execute multiple instructions Threads line threads relative for processes as process relative to operating system Multiple threads sharing resources for the same process Lightweight Processes high performance, easy to create application: One browser downloads multiple pictures at the same time, one server handles multiple requests at the same time Java Multithreading Create Inherit thread implement Runnable Interface (recommended) Life cycle New New One thread Ready execute the Start method Run start executing the Run method Blocking Enter blocking call the Sleep method to actively discard processor resources want to get a sync detector, but the sync detector is occupied by other resources call a blocking Io method, and the thread blocks before the method returns waiting for a notify notification call suspend pending Lifting Blocking call sleep exceeds specified time Call Blocking IO method has returned succeeded in getting the Sync checker you were trying to get when waiting for a notification, other threads are alerted The resume method is called by a suspended thread Death Run method End The program throws an exception that is not caught calling the Stop method

Related Article

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.