- 浏览: 577016 次
- 性别:
- 来自: 广州杭州
最新评论
-
bohc:
谢谢,搞了两天了,现在才算是找到问题所在,解决了。
文件在使用FileChannel.map后不能被删除(Windows上) -
zhang0000jun:
在jdk1.8中执行正好和楼主的结果相反,请指教
从Java视角理解CPU缓存(CPU Cache) -
在世界的中心呼喚愛:
forenroll 写道请问楼主的那个分析工具cachemis ...
从Java视角理解CPU缓存(CPU Cache) -
xgj1988:
我这里打出的结果是: 0 L1-dcache-load-mis ...
从Java视角理解CPU缓存(CPU Cache) -
thebye85:
请教下大神,为什么频繁的park会导致大量context sw ...
从Java视角理解CPU上下文切换(Context Switch)
文章列表
6 Sys and Proc_Lib
The module sys contains functions for simple debugging of processes implemented using behaviours.
There are also functions that, together with functions in the module proc_lib, can be used to implement a special process, a process which comply to the OTP design principles without ...
- 2007-06-27 00:31
- 浏览 2150
- 评论(0)
前些天给echo_server写了个非常简单的连接压力测试程序,
代码
-module(stress_test).
-export([start/0, tests/1]).
start() ->
tests(12345).
tests(Port) ->
io:format("starting~n&qu ...
- 2007-06-26 09:56
- 浏览 17882
- 评论(8)
erlc
命令
erlc
概要
编译器
描述
The erlc program provides a common way to run all compilers in the Erlang system. Depending on the extension of each input file, erlc will invoke the appropriate compiler. Regardless of which compiler is used, the same flags are used to provide parameters such as include ...
- 2007-06-24 15:08
- 浏览 3858
- 评论(0)
1. ssh
这东西连起来真麻烦, 比如有三台机器有10,20,30
要建ssh的有: 10->20,20->10, 10->30,30->10, 20->30, 30->20
最少要建连接数是一个排列数A(n, 2), 其中n代表节点数, 2代表任选两个节点. 3个节点得有A(3, 2) = 6.
2. 如果是用root用户, 则mpd.conf文件放在/etc下面,而不是.mpd.conf.其它用户是.mpd.conf
3. mpdboot根据一个文件来启动,一般用mpd.hosts. 得定义local节点在哪, 其它节点则在远程 ...
- 2007-06-23 15:19
- 浏览 4175
- 评论(1)
代码
-module(echo_server).
-export([start/0,stop/0]).
-define(LISTEN_PORT,12345). % 开放端口
-define(MAX_CONN, 5000). % 最大连接数
start() ->
process_flag(trap_exit, true), % 设置退出陷阱
tcp_server:start_raw_server(?LISTEN_PORT,
...
- 2007-06-23 14:45
- 浏览 2470
- 评论(3)
原译文发布在ocaml.cn , 这里的blog不支持html的说,郁闷 Ocamllex 改编者: SooHyoung Oh 此指南讲解怎么使用Ocaml语言分发包所带的ocamllex. 此文档从 flex 手册借签了很多. 请把你的意见和建议发至 此指南还在编写当中,最新的版本放在 http ...
5 Supervisor Behaviour
This section should be read in conjunction with supervisor(3), where all details about the supervisor behaviour is given.
这节应该和supervisor(3)结合来读,所有关于supervisor行为的细节都在那儿。
5.1 Supervision Principles
A supervisor is responsible for starting, stopping and monitoring its child pro ...
- 2007-06-22 12:15
- 浏览 2759
- 评论(1)
4 Gen_Event 行为
这一章应该与gen_event(3)结合起来看,gen_event(3)对所有接口函数和回调函数都有详细描述.
4.1 事件处理原则
在OTP中, an event manager is a named object to which events can be sent. An event could be, for example, an error, an alarm or some information that should be logged.
In the event manager, zero, one or several event ...
- 2007-06-22 11:59
- 浏览 2041
- 评论(0)
3 Gen_Fsm 行为
This chapter should be read in conjunction with gen_fsm(3), where all interface functions and callback functions are described in detail.
3.1 Finite State Machines
3.1 有限状态机
A finite state machine, FSM, can be described as a set of relations of the form:
java 代码State(S) x Event(E) -> ...
- 2007-06-22 11:56
- 浏览 2765
- 评论(2)
2 Gen_Server Behaviour
This chapter should be read in conjunction with gen_server(3), where all interface functions and callback functions are described in detail.
2.1 Client-Server Principles
The client-server model is characterized by a central server and an arbitrary number of clients. The clien ...
- 2007-06-22 11:35
- 浏览 2122
- 评论(0)
1 Overview
OTP 设计原则 是一套教你如何运用进程,模块和目录等条件来组织Erlang代码的原则.
1.1 Supervision Trees 管理树
A basic concept in Erlang/OTP is the supervision tree. This is a process structuring model based on the idea of workers and supervisors.
Erlang/OTP中的一个基本概念就是 管理树. 这是一个以工作者和管理者思想为基础的进程结构模型.
Workers are process ...
- 2007-06-22 10:56
- 浏览 3516
- 评论(0)
whereis(RegName) -> pid() | port() | undefined
Returns the pid or port identifier with the registered name RegName. Returns undefined if the name is not registered.
原来是erlang核心模块的东东, erlang:whereis/1. 传入注册的名称RegName, 返回进程ID或端口ID.如果没注册的话,返回undefined.
- 2007-06-21 20:04
- 浏览 1891
- 评论(0)
java 代码
%% Copyright (C) 2002, Joe Armstrong
%% File : tcp_server.erl
%% Author : Joe Armstrong (joe@sics.se)
%% Purpose : Keeps track of a number of TCP sessions
%% Last modified: 2002-11-17
-module(tcp_server).
-export([start_raw_server/ ...
- 2007-06-21 15:58
- 浏览 2909
- 评论(0)