‘Java虚拟机规范’把Java虚拟机的运行时数据区域划分为线程隔离的程序计数器, 虚拟机栈, 本地方法栈和线程共享的方法区, . 然而, ‘Java虚拟机规范’所描述的是Java虚拟机的概念模型(代表所有Java虚拟机的统一外观), 并未规定上述5个运行时数据区域的具体实现细节, 因此各款具体的Java虚拟机可能会用各种平台相关的, 更高效的方式进行等价的实现. Java虚拟机需要实现自动内存管理(主要是堆和方法区的内存管理), 势必引入垃圾收集器, 而内存的布局与管理又与所选用的垃圾收集器息息相关, 所以即使是同一种虚拟机, 使用不同垃圾收集器时其运行时数据区域(主要指堆和方法区)的实现都可能存在差别. 本文着重讲述Java虚拟机运行时数据区域的概念模型, 在一些重点部分加入了对HotSpot虚拟机具体实现的探讨, 特别总结了HotSpot虚拟机所实现的各个垃圾收集器的原理及其对应的自动内存管理方法.

Read More

Apache HBase能够在大数据集上为我们提供随机, 实时的读写访问. 然而, 在实际业务中, 我们的原始应用并非基于HBase构建. 这时候, 如何将大量的数据(这些数据的存储量可能是TB甚至PB级别的)导入到HBase中成了我们首先需要解决的问题. 最基本的, 我们可能会想到使用Client APIs或利用MapReduce Job通过TableOutputFormat写入. 然而, 这两种方式都不是最高效的, 在向HBase中导入大规模数据集时, 首先应该考虑的是HBase提供的Bulk Loading方法.

Read More

本文首先结合HBase过滤器的源码, 讲述HBase过滤器抽象基类Filter中各个函数的作用. 最终给出一个简单的自定义过滤器的案例, 在此基础上分析了Filter中各个方法的执行流程, 读者在理解该案例的基础上可以编写任何个性化的过滤器. 本文涉及的源码基于HBase 1.4.x.

Read More

拜占庭将军问题(The Byzantine Generals Problem)提供了对分布式共识问题的一种情景化描述, 由Leslie Lamport等人在1982年首次发表. 本文首先以插图的形式描述拜占庭将军问题, 最后在理解拜占庭将军问题的基础上对现有的分布式共识算法进行分类.

Read More

In recent years, thanks to the rapid growth of computing power, deep learning has blossomed. The increase in computing power is largely due to the GPUs. As we all know, the current popular deep learning frameworks such as tensorfow, pytorch, mxnet, etc. all support GPU acceleration. In order to explore the implementation principles behind the deep learning framework, this blog post will attempt to build a simple deep learning framework - Tinyflow. We will build a general automatic differentiation framework in which you can add any custom operator. To keep it simple, Tinyflow only implements the operators necessary for multilayer perceptron (MLP) models (such as MatMulOp, ReluOp, SoftmaxCrossEntropyOp), and of course it supports the addition of any other operators (such as ConvOp). At the bottom, we will use GPUs to accelerate matrix operations. Although compared to the mature deep learning framework, Tinyflow is very simple, but it does have the two core elements necessary for deep learning framework: automatic differentiation and GPU operation acceleration.

Read More

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×