목록성장캐/분산컴퓨팅 (7)
Divide and Conquer

https://velog.io/@sunaookamisiroko/Goroutine-%EC%8A%A4%EC%BC%80%EC%A4%84%EB%A7%81고루틴은 (c) N:M 스케줄링을 함global runqueue에서 M이 G를 하나씩 가져다가 실행global runqueue는 하나의 자료구조 > M이 동시에 사용하면 race condition 발생 > lock을 사용그런데, M은 G를 갖기 위해 lock을 기다려야 해서 성능저하로 이어짐+ 하나의 고루틴의 실행 시간이 길다면 다른 실행되지 않는 고루틴은 기아 상태에 빠질 수 있다Goroutine localityfunc main() { var wg sync.WaitGroup wg.Add(10) for i := 0; i main G가 새로운 G를 10..

s23710660@swye:~/sequential_mapreduce/src/mapreduce$ go test -run TestBasic ./...go tool compile: fork/exec /usr/lib/go-1.18/pkg/tool/linux_amd64/compile: resource temporarily unavailablego tool compile: fork/exec /usr/lib/go-1.18/pkg/tool/linux_amd64/compile: resource temporarily unavailablego tool compile: fork/exec /usr/lib/go-1.18/pkg/tool/linux_amd64/compile: resource temporarily unavailabl..

s23710660@swye:~/sequential_mapreduce/src$ cd ~/sequential_mapreduce/src/maingo run wc.go master sequential ../pg-*.txt$GOPATH/go.mod exists but should nots23710660@swye:~/sequential_mapreduce/src/main$Part 2에서 계속 위와 같은 문제가 발생$GOPATH/go.mod exists but should not 오류는 Go 모듈 모드에서 $GOPATH 디렉토리에 go.mod 파일이 있을 때 발생→GOPATH 환경 변수를 사용하지 않고, 모듈 모드에서 제대로 작동하도록 설정# GOPATH를 확인 echo $GOPATHcd /home/s23710660/..

s23710660@swye:~/sequential_mapreduce/src/mapreduce$ go test -run Sequential mapreduce/...ok mapreduce (cached)s23710660@swye:~/sequential_mapreduce/src/mapreduce$똑같은 명령을 실행했을 때 뭐가 4.3s가 나왔는데 cached로 출력됨> 이는 이전에 실행된 테스트 결과가 캐시된 상태라 실행되지 않았음을 의미go test -count=1 -run Sequential mapreduce/...위 명령어를 쓰면 캐시를 사용하지 않고 항상 새로운 결과를 얻을 수 있음> 이는 -count 플래그를 사용해서인데 =1은 항상 한 번씩 실행하라는 의미를 포함go clean ..

s23710660@swye:~/sequential_mapreduce/src$ go test -run Sequential mapreduce/...go: warning: "mapreduce/..." matched no packagesno packages to tests23710660@swye:~/sequential_mapreduce/src$go mod init mapreduce잉 근데 안 된다...src/mapreduce 경로에서 실행하니 잘 돌아가네아아아~! src 경로에서 실행하기 가능 가능cd /home/s23710660/sequential_mapreduceexport GOPATH="$PWD"echo $GOPATHcd srccd mapreduce go mod init mapreducego mod tid..

# 시스템 리소스 제한 확인ulimit -a# 열린 파일 수 늘리기ulimit -n 100000이렇게 설정하고 쓰니 돌아감(근데 이렇게까지 클 필요가 없어서 줄임)요약ulimit -n 16384go clean -testcachego test -run Failure mapreduce/...

RPC Golang Distributed OS vs. Hadoop MapReduce Distributed Graph Processing P2P & Distributed Hash Table Consistency in Distributed Systems Distributed Commit Erasure Coding Distributed Consensus Block Chain Distributed Snapshot Distributed File Systems Performance and Scheduling RPC(Remote Procedure Call) RPC는 원격 프로시저 호출로 로컬 위치가 아닌, 원격 위치(다른 주소 공간)에서도 함수나 프로시저를 실행할 수 있게 하는 프로세스간 통신 기술 * 함수와 프로시..