staff 와 lstaff 의 비교
DESCRIPTION
STAFF 와 LSTAFF 의 비교. 발표자 : 박 성 환 ( [email protected] ). STAFF. - Flash Memory System 의 Software 구조 -. STAFF. State Transition Applied Fast Flash Translation Layer. 목표 적은 양의 Memory 를 사용하여 실제 Embedded System 에 적용. Block States. F state(Free) Erase 후 Write 가 한번도 되지 않은 상태 - PowerPoint PPT PresentationTRANSCRIPT
Database & Information System Laboratory Database & Information System Laboratory
STAFFSTAFF 와 와 LSTAFFLSTAFF 의 비교의 비교
발표자 : 박 성 환([email protected])
Database & Information System Laboratory Database & Information System Laboratory
STAFFSTAFF
3
DISLab DISLab
Made By Hackereyes
STAFFSTAFF
• State Transition Applied Fast Flash Translation Layer
- Flash Memory System 의 Software 구조 -
• 목표– 적은 양의 Memory 를 사용하여 실제 Embedded System 에 적용
4
DISLab DISLab
Made By Hackereyes
Block StatesBlock States
• F state (Free)– Erase 후 Write 가 한번도 되지 않은 상태
• O state (Old)– Block 내의 존재하는 Data 들은 더 이상 유효하지 않음
• M state– In-place 로 Data 가 기록되고 있는 Block
• S state– M state Block 중 Block 이 가득 찬 Block– 교체 합병 연산에 의해 O state 로 전이 됨
• N state– Out-of-place 로 Data 가 기록되고 있는 Block
5
DISLab DISLab
Made By Hackereyes
Block States TransitionBlock States Transition
6
DISLab DISLab
Made By Hackereyes
Yes
Write Operation Flow ChartWrite Operation Flow Chart
Write OP
Write the input datato the M or N state block
Merging operationis needed
The block is convertedto the N state block
End OP
[Branch]Do merging operation
Yes
No
The logical blockcorresponding to the lsn
has an M or N stateblock
Get an F state blockNo
The F state block is convertedto the M state block
Write the input datato the M state block
Corresponding sector is empty
Yes
No
The block isthe M state block
No
Write the input datato the N state block
Yes
7
DISLab DISLab
Made By Hackereyes
Merging OperationMerging Operation
• Swap merging– M state block 에 Data 를 추가적으로 Write 하려 할 때 발생
• Smart merging– 더 이상 빈 공간이 없는 N state Block 에 Write 하려 할 때 발생
8
DISLab DISLab
Made By Hackereyes
Transition to O States BlockTransition to O States Block
• STAFF Algorithm 은 Logical Block 하나에 최대 2 개의 Physical Block 이 할당 됨
• 때문에 2 개의 Physical Block 에 더 이상 공간이 없을 시 O state Block 으로 전이 됨
9
DISLab DISLab
Made By Hackereyes
Yes
No
Read Operation Flow ChartRead Operation Flow Chart
Read OP
[The block is the N state block]
Read from the M state block
End OP
The logical blockcorresponding to the lsn
has an M or N stateblock
No
The block isthe M state block
Yes
No
The corresponding sector is set
No
Read from the S state block
Yes
The logical block has an S state block
No
Print : “The logical sectorhas not been written”
The logical block has an S state block
Yes
No
10
DISLab DISLab
Made By Hackereyes
Read Operation Flow ChartRead Operation Flow Chart
[The block is the N state block]
Print : “The logical sectorhas not been written”
The sector exist in the N state block
End OP
No
Read from the N state blockYes
The logical block has an S state block
Read from the S state blockYes
No
11
DISLab DISLab
Made By Hackereyes
Read OperationRead Operation
• 읽혀질 Data 는 M,N or S Block 에 존재
• 읽혀질 Data 가 두 개의 Physical Block 에 존재 시– M or N 의 Data 가 최신 Data 임
Database & Information System Laboratory Database & Information System Laboratory
LSTAFFLSTAFF
13
DISLab DISLab
Made By Hackereyes
DefinitionDefinition
1. Sector1. File System 에서 Read/Write 연산을 수행하는 최소 단위
2. Page1. Flash Device 에서 Read/Write 연산을 수행하는 최소 단위
3. Block1. Flash Device 에서 Erase 연산을 수행하는 단위가 됨 (Erase Unit)2. 여러 개의 Page 로 구성됨 ( 1 Block = 64 Page )
4. 같은 Sector/Page 에 Rewrite 를 하려면 해당 Block 을 먼저 Erase해야 함
14
DISLab DISLab
Made By Hackereyes
Large STAFFLarge STAFF
• Mapping– Small Block 에서는 Sector/Block 단위의 Mapping 만 고려– Large Block 에서는 Sector/Page/Block 단위의 Mapping 을 고려
• 약자
논문에서의 의미 분석한 의미
lsn Logical Sector Number Logical Sector Number
lbn Logical Block Number Logical Block Number
lpn Logical Page Number Logical Page Offset in a Block
lso Logical Sector Offset Logical Sector Offset in a Page
np Number of Pages in a Block Number of Pages in a Block
ns Number of Sectors in a Page
15
DISLab DISLab
Made By Hackereyes
Large STAFFLarge STAFF
• 계산
• 논문에서의 예– lsn = 101 , lbn = 1 , lpn = 9 , lso = 1
• 분석한 예– lsn = 101 , lbn = 0 , lpn = 25 , lso = 1
논문에서의 계산 분석한 계산
lbn lbn = lsn / np lbn = lsn / (np*ns)
tmp = lsn % np tmp = lsn % (np*ns)
lpn lpn = tmp / ns lpn = tmp / ns
lso lso = tmp %ns lso = tmp % ns
16
DISLab DISLab
Made By Hackereyes
실험 환경실험 환경
• 약 128 MB 크기의 Flash Device– 1024 blocks/device , 64 pages/block , 4 sectors/page
– 1 page 당 1 Spare Area 가 존재 • 64 Bytes
• 단위 – 1 Page = 4 Sectors– 1 Block = 64 Pages
• 크기– 1 Page = 약 2KB – 1 Block = 약 131 KB – 1024 Block = 약 134 MB
17
DISLab DISLab
Made By Hackereyes
LSTAFFLSTAFF 에서 제안하는 에서 제안하는 Page FormatPage Format
• 세 단계로 Mapping 정보를 저장함– Sector , Page , Block
• lsn 과 lpn 은 Page 당 저장 되며 , lbn 과 Block State 는 Block 당 저장 됨
• F , S , O , M State Blocks 는 lsn 이나 lpn 이 필요 없음– N State Block 은 out-of-place 로 기록되기에 lsn 이나 lpn 을 사용함
18
DISLab DISLab
Made By Hackereyes
N State BlockN State Block 의 의 Mapping OptionsMapping Options
1. Page Mapping1. Logical page number Physical page number Mapping2. lsn 은 Flash Memory 에 기록하지 않아도 됨
2. Sector Mapping1. Logical sector number Physical sector number Mapping2. lpn 은 Flash Memory 에 기록하지 않아도 됨
3. 1:N Mapping1. 하나의 Logical page/sector 가 하나 이상의 Physical page/sector 와 M
apping 됨
19
DISLab DISLab
Made By Hackereyes
Page Mapping vs Sector MappingPage Mapping vs Sector Mapping
• ex) lsn Sequence : 0,1,2,3,0,1,2,3,8,9,9
20
DISLab DISLab
Made By Hackereyes
EvaluationEvaluation
• LSTAFF 는 STAFF 와 성능 평가식이 동일 함
• LSTAFF 는 STAFF 에 비해 동시에 다수의 Sector 를 Read/Write 할 수 있기 때문에 전반적으로 성능이 좋았음