<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>阿杰的技术专栏</title>
    <description>个人博客 https://jie3615.github.io/</description>
    <link>https://jie3615.github.io/</link>
    <atom:link href="https://jie3615.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 12 Oct 2019 01:02:27 +0000</pubDate>
    <lastBuildDate>Sat, 12 Oct 2019 01:02:27 +0000</lastBuildDate>
    <generator>Jekyll v3.8.5</generator>
    
      <item>
        <title>Jvm系列-深入理解字节码文件-常量池之后（二）</title>
        <description>[TOC]
&lt;strong&gt;常量池之后，接上篇分析&lt;/strong&gt;

&lt;h2 id=&quot;类相关的字节码分析&quot;&gt;类相关的字节码分析&lt;/h2&gt;

</description>
        <pubDate>Fri, 11 Oct 2019 20:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/10/11/Jvm-bytecode2/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/10/11/Jvm-bytecode2/</guid>
        
        <category>字节码</category>
        
        <category>Jvm</category>
        
        
        <category>Jvm</category>
        
      </item>
    
      <item>
        <title>Jvm系列-深入理解字节码文件（一）</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#源码&quot; id=&quot;markdown-toc-源码&quot;&gt;源码&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;源码&quot;&gt;源码&lt;/h2&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;public class ByteCodeTest1 {
    private int a = 1;

    public int getA() {
        return a;
    }

    public void setA(int a) {
        this.a = a;
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Wed, 09 Oct 2019 20:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/10/09/Jvm-bytecode/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/10/09/Jvm-bytecode/</guid>
        
        <category>字节码</category>
        
        <category>Jvm</category>
        
        
        <category>Jvm</category>
        
      </item>
    
      <item>
        <title>Jvm系列-深入理解类加载器ClassLoader</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#类加载器的种类&quot; id=&quot;markdown-toc-类加载器的种类&quot;&gt;类加载器的种类&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;类加载器的种类&quot;&gt;类加载器的种类&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;根类/启动类加载器&lt;/li&gt;
  &lt;li&gt;扩展类加载器&lt;/li&gt;
  &lt;li&gt;系统类/应用类加载器&lt;/li&gt;
  &lt;li&gt;用户自己定义的类加载器&lt;/li&gt;
  &lt;li&gt;线程上下文类加载器&lt;/li&gt;
&lt;/ol&gt;

前三种是默认的三种类加载器，他们分别负责加载不同路径下的class文件；如下：

</description>
        <pubDate>Sun, 29 Sep 2019 20:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/09/29/Jvm-classLoader-sourcecode/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/09/29/Jvm-classLoader-sourcecode/</guid>
        
        <category>类加载器</category>
        
        <category>ClassLoader</category>
        
        
        <category>JVM</category>
        
      </item>
    
      <item>
        <title>Jvm系列-深入理解类加载过程</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#类加载器主要流程&quot; id=&quot;markdown-toc-类加载器主要流程&quot;&gt;类加载器主要流程：&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;类加载器主要流程&quot;&gt;类加载器主要流程：&lt;/h2&gt;

加载&amp;gt;连接（校验，准备，解析）&amp;gt;初始化&amp;gt;使用&amp;gt;卸载

</description>
        <pubDate>Sun, 08 Sep 2019 20:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/09/08/Jvm-classLoader/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/09/08/Jvm-classLoader/</guid>
        
        <category>JVM</category>
        
        <category>类加载</category>
        
        
        <category>JVM</category>
        
      </item>
    
      <item>
        <title>Java并发系列-深入理解volatile</title>
        <description>&lt;blockquote&gt;
  &lt;strong&gt;&lt;em&gt;在并发场景中我们经常会看到volatile的身影，它到底能解决哪些问题&lt;/em&gt;？&lt;/strong&gt;
&lt;/blockquote&gt;

</description>
        <pubDate>Tue, 27 Aug 2019 20:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/08/27/Java-volatile/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/08/27/Java-volatile/</guid>
        
        <category>Java</category>
        
        <category>线程</category>
        
        <category>volatile</category>
        
        
        <category>并发</category>
        
      </item>
    
      <item>
        <title>Java并发系列-从消费者生产者模型理解wait/notify</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#生产者消费者模型的特性&quot; id=&quot;markdown-toc-生产者消费者模型的特性&quot;&gt;生产者/消费者模型的特性&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

wait/notify实现生产者消费者

线程的协作机制wait/notify，线程除了有竞争关系，他们还存在着协作，下面我们就用实际案例来描述下他们的协作关系

&lt;h2 id=&quot;生产者消费者模型的特性&quot;&gt;生产者/消费者模型的特性&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    ​    消费者、生产者是通过一个缓冲区进行通信的，这个缓冲区可以是阻塞队列；
  &lt;/li&gt;
  &lt;li&gt;
    ​    生产者在队列满的时候停止生产；
  &lt;/li&gt;
  &lt;li&gt;
    ​    消费者在队列空的时候停止消费；
  &lt;/li&gt;
  &lt;li&gt;
    ​     生产者/消费者模型可以提高程序执行效率，我们可以调节生产者、消费者的个数来达到处理速度的平衡，提高资源利用率；
  &lt;/li&gt;
  &lt;li&gt;
    ​    还有一个重要的特性，可以解耦，对于耦合性强的程序，我们可以通过这种方式进行解耦处理，当然现在各种mq很多，也是利用了这个思路来完成解耦；

    &lt;blockquote&gt;
      研究wait/notify底层机制也有段时间了，今天我不打算从jvm层面说的太多，因为这这个完全可以开个章节，很多东西可以聊。我们都知道这是Object提供的三个方法，经常被忽视，或者我们很多时候压根用不到。但是了解它的精髓对我们了解并发这一块知识会有很大的帮助。

      既然说到Object的方法，那肯定是每个对象都有，为什么？因为它在jvm层面是跟ObjectMonitor息息相关，这个类就是承载我们对象监视器的地方，也就是每个对象都有一把锁。现在不需要知道太多，但是有两点我希望你们可以明白，第一个执行wait的线程在waitSet(等待池)，被唤醒的线程在entrySet(姑且叫锁池吧)；下面开始撸代码.
    &lt;/blockquote&gt;
  &lt;/li&gt;
&lt;/ol&gt;

</description>
        <pubDate>Sun, 04 Aug 2019 20:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/08/04/Java-wait-notify/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/08/04/Java-wait-notify/</guid>
        
        <category>Java</category>
        
        <category>线程</category>
        
        <category>Jvm</category>
        
        
        <category>并发</category>
        
      </item>
    
      <item>
        <title>Java并发系列-深入Jvm理解Thread启动流程</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#前言&quot; id=&quot;markdown-toc-前言&quot;&gt;前言&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#java中的线程&quot; id=&quot;markdown-toc-java中的线程&quot;&gt;Java中的线程&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;前言&quot;&gt;前言&lt;/h2&gt;
近期整理笔记想开个专题，准备从并发入手。并发这块又从哪里入手，一开始想的是AQS，偶然间看到自己之前编译调试openjdk的时候整理的一些笔记，又有了新的想法，决定先从最基础的开始，并发这块脱离不了线程，那么我们就结合jdk,hotspot探究一下线程的来龙去脉。
线程的定义：程序运行的最小单元，被包含在进程中。
&lt;h2 id=&quot;java中的线程&quot;&gt;Java中的线程&lt;/h2&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;class Thread implements Runnable {
    /* Make sure registerNatives is the first thing &amp;lt;clinit&amp;gt; does. */
    private static native void registerNatives();
    static {
        registerNatives();
    }
    ...//省略一大波代码，和一些英文注释
    public synchronized void start() {
        if (threadStatus != 0)
            throw new IllegalThreadStateException();

        group.add(this);

        boolean started = false;
        try {
            start0();
            started = true;
        } finally {
            try {
                if (!started) {
                    group.threadStartFailed(this);
                }
            } catch (Throwable ignore) {
                /* do nothing. If start0 threw a Throwable then
                  it will be passed up the call stack */
            }
        }
    }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
通常我们使用线程都是调用的start()方法；  &lt;br /&gt;
从上面的Thread的源码结构我们可以看到start()方法
先判断是否是NEW状态，如果不是，抛出线程状态异常；
接下来执行start0()

</description>
        <pubDate>Mon, 29 Jul 2019 20:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/07/29/Java-Thread/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/07/29/Java-Thread/</guid>
        
        <category>Java</category>
        
        <category>线程</category>
        
        <category>Jvm</category>
        
        
        <category>并发</category>
        
      </item>
    
      <item>
        <title>闲谈</title>
        <description>
</description>
        <pubDate>Thu, 25 Jul 2019 16:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/07/25/%E9%97%B2%E8%B0%88/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/07/25/%E9%97%B2%E8%B0%88/</guid>
        
        <category>闲谈</category>
        
        
        <category>闲谈</category>
        
      </item>
    
      <item>
        <title>blog-test</title>
        <description>
&lt;blockquote&gt;
  仅仅用作测试！娜娜你好~
  &lt;ul&gt;
    &lt;li&gt;断断续续笔记也写了不少了，准备整理成技术文档分享出来，共勉~&lt;/li&gt;
    &lt;li&gt;github原名称太长，重新改了名字，pages也重建了…&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;img src=&quot;https://raw.githubusercontent.com/jie3615/blogImages/master/images/wyj.png&quot; alt=&quot;image&quot; /&gt;
</description>
        <pubDate>Thu, 25 Jul 2019 16:06:06 +0000</pubDate>
        <link>https://jie3615.github.io/2019/07/25/test/</link>
        <guid isPermaLink="true">https://jie3615.github.io/2019/07/25/test/</guid>
        
        <category>闲谈</category>
        
        
        <category>闲谈</category>
        
      </item>
    
  </channel>
</rss>
