[MIT 6.S081 Fall 2020] Lab: locks
xv6
https://pdos.csail.mit.edu/6.S081/2020/labs/lock.htmlRead in GithubMemory allocatorkmem을 CPU의 개수(NCPU)만큼의 element들을 갖는 배열로 수정한다./* kernel/kalloc.c */struct { struct spinlock lock; struct run *freelist;} kmem[NCPU];CPU마다 lock name을 다르게 만들어야 하므로, kmem 구조체에 lockname을 추가한다./* kernel/kalloc.c */#define LOCKNAME_MAX 0x10struct { struct spinlock lock; char lockname[LOCKNAME_MAX]; struct ..