islab flash team flash file system ban,a. 1995. us patent 5,404,485 한국외국어대학교...

16
ISLab Flash Team ISLab Flash Team Flash File System Flash File System Ban ,A. 1995. US Patent 5,404,485 한한한한한한한한 한한한한한한한한한한한 2006.02.19 한 한 한

Upload: brent-bradford

Post on 28-Dec-2015

220 views

Category:

Documents


1 download

TRANSCRIPT

ISLab Flash TeamISLab Flash Team

Flash File SystemFlash File System

Ban ,A. 1995. US Patent 5,404,485

한국외국어대학교 컴퓨터및정보통신공학과2006.02.19

박 성 환

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 2

목 차목 차

1. Background of the invention

2. Summary of the invention

3. System Architecture

4. Zone & Unit

5. Unit Format

6. How the computer generated addresses

7. Operation1. Read2. Write3. Transfer

8. Two-level Mapping

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 3

Background of the inventionBackground of the invention

• Field of the invention– Flash Memory 의 저장 성능을 향상시키고 , Flash Memory 에

저장되는 Data 를 잘 관리해보고자 개발을 함

• Description of the Prior Art– Disk 와 같은 저장장치를 위해 Design 된 이전 OS 프로그램은 Flash

Memory 와는 맞지 않음– Flash Memory 의 특성을 고려한 OS 프로그램 개발이 필요함

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 4

Summary of the inventionSummary of the invention

• Virtual mapping system 은 이전 OS 프로그램이 Flash Memory 를 직접 물리적 주소로 Read/Write 하는 것을 가능하게 함

• Virtual map 은 RAM 에 Virtual Number 를 저장

• OS 에서 Read/Write 를 하면 Virtual Map 을 통해서 실제 물리 주소를 알아내서 연산함– 실제 물리 Memory 는 접근 불가

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 5

System ArchitectureSystem Architecture

• Processor 는 Flash control 을 통해서만 I/O 를 할 수 있음

• 효율적인 I/O 를 위해 RAM 에 Mapping table 을 저장하여 사용함

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 6

Zone & UnitZone & Unit

• Zone– 하나 또는 물리적으로 연속된

Flash Memory Area

• Unit– 각 Unit 은 여러 Block 들을

포함함– 하나 혹은 복수개의 Zone

으로 구성– Ex) 그림에서는 2 개의

Zone 으로 구성

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 7

Unit FormatUnit Format

• 21: 여러 Block 들을 소유– Block number 와 Offset 으로 접근가능

• Unit Header– Format Identifier– Unit 의 Logical unit number– System-wide information 도 가질 수 있음

• Block Allocation Map– Unit 안에 Block 정보

• Allocate status – Free and writable– Deleted and not writable– Allocated and contains user data

• Offset• Block 의 Virtual Address

– Back pointer

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 8

How the computer generated addressesHow the computer generated addresses

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 9

How the computer generated addressesHow the computer generated addresses

1. Computer 는 Block number 와 Offset 으로 이루어진 Address 를 생성

2. Controller 가 이를 Virtual Address 로 변환1. Virtual Map 은 Virtual Address Space 와 Physical Address Space 간의

변환에 이용됨

3. Virtual Map 을 이용해 Logical Unit Number 을 알아내어 Logical Address 를 얻어냄1. 이때 Block Offset 은 그대로 유지해서 가져옴2. Logical Block Address 와 Block Offset 을 통해 Block Offset in Unit 을

알아냄

4. Logical Unit Number 를 Physical Unit Number 로 변환하여 Physical Address 를 얻음1. 이때 Block Offset in Unit 은 그대로 유지해서 가져옴

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 10

Read OperationRead Operation

1. Virtual Address 로 Logical Address 를 알아냄

2. Logical Address 로 Physical Address 를 알아냄

3. Physical Address 에서 Data 를 읽음

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 11

Write OperationWrite Operation

1. Virtual Address 로 Logical Unit Address 를 알아냄

2. Unit Allocatation Table 을 검사함

3. Logical Address 가 Free 인가 ?

4. Free 이면1. Unit Address 를 Physical Address 로

변환2. 해당 Physical Address 에 Data 기록3. Operation 을 끝냄

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 12

Write OperationWrite Operation

4. Free 가 아니라면1. Unit Allocation Table 에 Free 한

공간을 찾음2. Logical Address 는 새로운 Physical

Address 에 Mapping 됨3. 해당 Physical Address 에 Data 가

기록됨4. Unit Allocation Table 에 이전

Logical Address 는 “ deleted and not writable” 로 갱신함

5. Unit Allocation Table 에 Logical Address 는 Data 를 기록한 새로 할당된 Physical Block 으로 기록

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 13

Transfer UnitTransfer Unit

• 제한없이 Read/Write Operation 을 하기 위해 주기적으로 Flash Memory 공간을 재생시켜야 함

• Free 한 Block 들만 가지는 Transfer Unit 을 항상 꼭 하나 제공함

• Ex)

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 14

Transfer OperationTransfer Operation

1. Transfer 를 위해 Unit 을 선택함

2. 선택된 Unit 내의 모든 Active 한 Block 들을 읽음

3. Transfer unit 에 위치를 지켜서 저장함

4. Flash 는 선택된 Unit 을 Erase 함

5. Logical to Physical Address Map 을 갱신해 줌

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 15

Virtual MapVirtual Map 의 크기의 크기

• 80 Mbytes 의 Flash Memory– 640 Kbytes 의 Virtual Map

• Two-level Mapping– Primary Map 은 Flash Memory 상에 유지– Secondary Map 은 Main Memory 에 유지

RAMFlash

Memory

SecondaryMap

PrimaryMap

PrimaryMap

PrimaryMap

PrimaryMap

ISLab Flash Team ISLab Flash Team

Made By HackereyesSee like hacker's eyes 16

Two-level MappingTwo-level Mapping

1. Processor 가 Virtual Address 를 Page Number로 변환

2. Page Number 를 이용해 Flash 에 있는 Primary Virtual Map(PVM) 을 찾기 위해 RAM 에 있는 Secondary Virtual Map(SVM) 을 사용함

3. 찾아낸 SVM 을 RAM 에 읽어들임

4. SVM 에서 Physical Address 를 찾아서 Read/Write 연산을 함1. 단 , Write 연산은 앞에서와 같이 SVM 을 갱신함2. 이전에 Page Block 을 Virtual Map 에서 Deleted

처리함3. 새로운 Map 에 대한 Pointer 를 Virtual Map 에

저장함