この章では並行オブジェクトの correctness と progress を規定する様々な方法を学ぶ。
correctness の3つタイプ
- Quiescent consistency
- 弱い制約。ハイパフォーマンスを必要とするシステムに使える
- Sequential consistency
#!/bin/bash | |
threshold=${1-95} | |
now=$(date '+%Y-%m-%d %H:%M:%S') | |
cache=() | |
jps -q | xargs ps hH k -pcpu o pid,lwp,pcpu,args \ | |
| awk "\$3 >= $threshold" | while read line; do | |
array=($(echo "$line")) |
DROP TABLE IF EXISTS t; | |
CREATE TABLE t ( | |
id INT NOT NULL AUTO_INCREMENT, | |
x INT NOT NULL, | |
y INT NOT NULL, | |
z INT NOT NULL, | |
PRIMARY KEY (id) | |
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; | |
DELIMITER $$ |
-- http://dev.mysql.com/doc/refman/5.5/en/partitioning-linear-hash.html | |
DELIMITER $$ | |
DROP FUNCTION IF EXISTS linearHashing$$ | |
CREATE FUNCTION linearHashing(value INT, num INT) RETURNS INT DETERMINISTIC | |
BEGIN | |
SET @v := POWER(2, CEILING(LOG(2, num))); | |
SET @n := value & (@v - 1); | |
IF @n >= num THEN | |
SET @v := CEILING(@v / 2); | |
SET @n := @n & (@v - 1); |
import java.io.IOException; | |
import java.lang.management.ManagementFactory; | |
import java.lang.management.ThreadInfo; | |
import java.lang.management.ThreadMXBean; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.management.remote.JMXConnector; | |
import javax.management.remote.JMXConnectorFactory; |
@set CHAINLP_DIR=C:\ChainLP40b12 | |
@set CHAINLP=%CHAINLP_DIR%\ChainLP.exe | |
@set SETTING=%CHAINLP_DIR%\%~n0.ini | |
@set OUTPUT_DIR=%~dp0 | |
@for %%f in (%*) do "%CHAINLP%" -b -ini "%SETTING%" -i %%f -o "%OUTPUT_DIR%\%%~nf.cbz" |
@charset "utf-8"; | |
h1, h2, h3, h4, h5, h6 { | |
color: #556; | |
font-weight: normal; | |
line-height: 1.4; | |
margin: 15px 0; | |
border: none; | |
} |