Skip to content

Instantly share code, notes, and snippets.

View jeehoonkang's full-sized avatar
😴
Zzz...

Jeehoon Kang jeehoonkang

😴
Zzz...
View GitHub Profile
### Keybase proof
I hereby claim:
* I am jeehoonkang on github.
* I am jeehoonkang (https://keybase.io/jeehoonkang) on keybase.
* I have a public key whose fingerprint is AC58 D61A 93EF 4749 1C88 EA13 5EB4 CC17 F331 8420
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am jeehoonkang on github.
* I am jeehoon_kang (https://keybase.io/jeehoon_kang) on keybase.
* I have a public key whose fingerprint is AC58 D61A 93EF 4749 1C88 EA13 5EB4 CC17 F331 8420
To claim this, I am signing this object:
#include <atomic>
class SpinLock {
std::atomic_flag locked = ATOMIC_FLAG_INIT ;
public:
void lock() {
while (locked.test_and_set(std::memory_order_acquire)) { ; }
}
void unlock() {
locked.clear(std::memory_order_release);
@jeehoonkang
jeehoonkang / Linux Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz (12 cores, 24 hw threads)
Last active March 12, 2018 01:58
benchmarking crossbeam-channel and concurrent-circbuf
$ cargo run --release --bin crossbeam-channel | tee crossbeam-channel.txt
Compiling crossbeam-channel v0.1.2 (file:///home/jeehoon.kang/Works/crossbeam-channel)
Compiling benchmark v0.1.0 (file:///home/jeehoon.kang/Works/crossbeam-channel/benchmarks)
Finished release [optimized] target(s) in 7.27 secs
Running `target/release/crossbeam-channel`
bounded0_mpmc Rust channel 6.226 sec
bounded0_mpsc Rust channel 7.147 sec
bounded0_select_both Rust channel 102.518 sec
bounded0_select_rx Rust channel 8.880 sec
bounded0_spmc Rust channel 7.332 sec
@jeehoonkang
jeehoonkang / Dockerfile
Last active February 28, 2018 08:43
Artifact Evaluation README for PLDI 2018 Submission #41
FROM ubuntu:16.04
MAINTAINER Jeehoon Kang <[email protected]>
RUN apt update && apt install -y \
git vim \
gcc libboost-all-dev cmake \
opam m4 pkg-config \
&& rm -rf /var/lib/apt/lists/*
RUN opam init -y && opam switch 4.05.0
@jeehoonkang
jeehoonkang / queue.rs
Created September 18, 2017 13:23
Intrusive Concurrent MPSC Queue
/* Copyright (c) 2010-2011 Dmitry Vyukov. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
@jeehoonkang
jeehoonkang / reception-sop.md
Last active June 23, 2017 12:08
SOP for Wedding Reception

결혼식 접수 SOP

  • 목적: 결혼식 접수를 원활하게 진행하기 위해. 전례를 보아 미리 접수 방법을 숙지하지 않으면 밀려드는 인파를 감당하기 어려울 수도 있음.
  • 작성자: @jeehoonkang ([email protected])

모둠 구성

각 모둠은 한 가문의 손님을 담당한다.

  • 신랑 모둠: 노형균, 박태홍
#!/usr/bin/env python3
import argparse
def interpret_lines(lines):
result = []
for line in lines:
for item in line.split(','):
values = item.split('-')
cpu1: starting
cpu0: starting
sb: size 1000 nblocks 941 ninodes 200 nlog 30 logstart 2 inodestart 32 bmap start 58
init: starting sh
$ ls
. 1 1 512
.. 1 1 512
README 2 2 2487
cat 2 3 14136
echo 2 4 13368
@jeehoonkang
jeehoonkang / xv6-public.diff
Created November 21, 2016 03:09
xv6-public.diff
diff --git a/Makefile b/Makefile
index 93d525a..db07442 100644
--- a/Makefile
+++ b/Makefile
@@ -70,15 +70,16 @@ QEMU = $(shell if which qemu > /dev/null; \
echo "***" 1>&2; exit 1)
endif
-CC = $(TOOLPREFIX)gcc
+CC = $(TOOLPREFIX)clang