linux buffer management를 보다보니 slab이란 용어가 나옴.
예전에 용책임이 slab이란 말을 했고, 리눅스에서 메모리 확인할 때 slab info를 쓴다는 말을 들었는데 그게 뭘까 해서 찾아 봄.
slab은 커널 내부에서 메모리 관리를 할때 사용하는 방식.
- slab는 일반적인 메모리 관리 layer
- slab은 여러개의 cache로 이루어지는데 각각의 cache는 cache되는 object type 마다 1개씩 존재함. 즉 inode용 cache, skbuffer용 cache 등..
- 하나의 cache는 1개 혹은 그 이상의 물리적으로 연속된 page로 구성됨. 대개 1개 임.
-> 이렇게 때문에 memory fragmentation이 발생하지 않는다고 하는데 아마도 fragmentation의 기준을 page로 삼기 때문이 아닌가 싶음. 좀 더 확인 필요.
- cache마다 full, partial, empty등의 속성이 있어 메모리 할당이 요구되는 경우 partial 혹은 empty에서 할당됨
- 2.2 부터 memory fragmentation을 처리하기 위해 도입됨.
-> 그 전에는 buddy system으로 구성됨. 그러나 작은 크기의 데이터할당이 많은 경우 buddy system은 internal fragmentation 문제를 가짐.
- vmstat -m
* Internal fragmentation : 실제 필요한 것보다 많이 할당해서 낭비되는 경우. 예를 들어 buffer의 크기를 무조건 2K씩 할당하는 경우 2K보다 작은 경우는 (2k – 실제 데이터 크기) 만큼의 낭비가 발생한다.
* External fragmentation : 실제 메모리 공간에서 남아 있는 공간의 합은 충분하지만 할당되지 않은 공간들이 여러 곳에 산재해 있어 하나의 버퍼로 사용될 수 없는 경우.
학교 다닐 때 공부했던 단어를 다시 들으니 기분이 ..
Buddy system
참고
http://www.inf.fu-berlin.de/lehre/SS01/OS/Lectures/Lecture14.pdf
Linux kernel Development
http://kerneltrap.org/node/5336 budy and slab allocators.
http://www.linuxworld.com.au/article/189774/slab_defragmentation?fp=4194304&fpid=1 slab defragmentation
http://en.wikipedia.org/wiki/Slab_allocation
Categorized in study
Tags: linux, slab
* 개구리 멀리뛰기/금동헌/아주좋음
* 환희의 여섯번째 생일/강은진/아주좋음
* 우리 집의 예쁜자/김성은/보통
* 마법학교에서 생긴 일/김세실/보통
* 알아맞쳐 볼래/차미정/아주좋음
* 곰가족과 시끌벅쩍 괴물들/차보금/아주좋음
* 마술약을 먹은 보글보글 아줌마/신지윤/아주좋음
* 사라진 아빠를 찾아서/장선애/아주좋음
Categorized in me2day
Tags: book
- 세상에서 가장 멋진 돼지
- 미술관에서 만난 수학
- 곰 세 마리와 금발머리
- 집 없는 아이
- 이상한 나라의 앨리스
Categorized in me2day
Tags: book
- 양반을 가르친 하인
- 우렁이 각시
- 외계인은 팬티를 좋아해
- 새를 사랑하는 새장
- 망주석 재판
Categorized in me2day
Tags: book
- 물마시기 대작전/마마다 미네코
- 뭐가 무서워/강영선
- 열려라 통신/전찬희
- 어른이 되고 싶어요/제니 스토
- 토마토맨/박건수
- 식물은 뭘 먹고 자랄까/박혜은
- 누구 알이 더 많을까/김해원
- 사이좋은 형제와 이상한 도둑/김장성
Categorized in me2day
Tags: book
Well, I got my Mac yesterday and was, frankly, kinda put off by the instructions I found at site after site for moving from a PC with thunderbird to a mac with Apple mail.
And then, today, I found something that is just extremely simple. The link is:
http://forums.mactalk.com.au/16/40924-h … -mail.html
In short, you compact your mail folders on your PC with thunderbird.
Shutdown thunderbird.
Find your profile folder: xxxxxx.default
where xxxxxx are random letters apparently.
Simply copy that to a thumb drive.
Plug the thumb drive into the mac.
In mac mail, go to File/Import Mailboxes
Select Thunderbird then press continue to locate the profile directory on the thumb drive.
Apple mail will do the rest. The mail will appear as “Imported mail”
Goto “Mailbox” on the menu and select “Rebuild” to ensure no corruption. You have to select each mail folder to be able to rebuild it.
Quit Mail and restart. Everything should be there, though not marked as “read” anymore.
It’s amazingly easy – more trouble to type the instructions than to just do it, but check the link in case I said something wrong!
via Thunderbird mail moving to Mac • mozillaZine Forums.
Categorized in lifehack and mac