Predictable FTL for Buffer Reordering.ppt
Upcoming SlideShare
Loading in...5
×
 

Predictable FTL for Buffer Reordering.ppt

on

  • 803 views

 

Statistics

Views

Total Views
803
Views on SlideShare
801
Embed Views
2

Actions

Likes
0
Downloads
10
Comments
0

1 Embed 2

http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 용어 재정의 필요 Transaction 이라는 말은 기존의 transaction 의 용어가 있으므로 변경하는 것이 좋을 것 같음 . Operation 의 정의를 명확히 할 필요가 있음 Resource 의 구분이 모호함 .
  • 시스템이 사용하는 메모리는 portable and embedded system 에서 항상 사용의 제약을 받는다 시스템이 사용하는 메모리 중에는 버퍼 메모리가 있는데 이는 디스크와 같은 저장 장치에 접근할 때 항상 사용하게 된다 Recently, NAND Flash Memory is widely used NAND Flash Memory 에 접근할 때도 역시 버퍼메모리를 사용한다 . 따라서 NAND Flash 의 특성을 파악 , 이용하여 버퍼메모리의 사용량을 줄일 수 있는 방법을 찾아보자
  • When write transaction is occurred, The kernel informs FTL that it has a buffer whose contents should be output, and FTL schedules the block for I/O. 따라서 , 버퍼메모리를 줄이기 위해서 본 논문에서는 SJF (Shortest-Job-First) 스케줄링 정책을 이용한다 왜냐하면 , SJF 는 평균 응답 시간을 최소화하기 위한 최적의 방법이고 , 따라서 , SJF 스케줄링을 통해 짧은 평균 응답 시간을 가진 트랜젝션을 먼저 수행한다면 , 각 쓰기 트랜젝션이 버퍼를 점유하는 평균시간을 최소화할 수 있고 이는 버퍼의 최대 사용량 , 버퍼 메모리 요구량을 줄이는 것을 의미한다
  • - 가장 짧은 트랜젝션을 먼저 찾기 위해 각 트랜젝션의 평균 응답 시간을 구한다 트랜젝션의 평균 응답 시간은 트랜젝션이 포함한 각 작업의 WCET 를 합해서 구하는데 , 그 이유는 각 작업의 평균 응답 시간에 편차가 적기 때문에 WCET 를 이용해도 무리 없음 - 현재 수행하는 트랙젝션보다 평균 응답 시간이 짧은 트랜젝션의 요청이 있을 때 , 선점을 허용한다
  • 평균 응답 시간 계산 각 트랜젝션이 수행할 작업 집합 유도 FTL 모델링 자원 가용량 : FTL 의 자료구조로부터 간단하게 얻을 수 있음 위의 두 가지를 입력으로 하는 작업 집합 유도 알고리즘 각 트랜젝션의 평균 응답 시간 계산 따라서 위의 알고리즘을 통해 얻은 작업 집합내의 각 작업의 WCET 의 단순 합 참고 ) 모든 작업의 WCET 는 정적 분석이든 실측 분석이든 계산되어 있다고 가정
  • Can be divided into five categories: Meta management eraseIBlk, metaGC, WLIBlk Log group management makeActive, makeInactive Log block management getNewLog, compaction, selfCompaction Free block management eraseFBlk, WLFBlk I/O processing writePage
  • Garbage collection 때문에 항상 하나의 free block 의 여유분이 있어야 한다 .
  • 현재 수행 중인 트랙젝션의 남은 처리시간을 예측할 수 있어야 새로 요청되는 트랜젝션의 수행 시간과 비교하여 선점 여부를 결정 Preemption 각 트랜젝션의 순차적인 작업 집합을 앞에 말한 것처럼 구하고 , 현재 실행 중인 트랙젝션의 작업을 마친 후 선점이 가능하도록 함 It is required to predict the remaining execution time of the currently executed transaction at run-time to compare with a newly arrived transaction The remaining execution time of the currently executed operation + The 앞에 말한 것처럼 적은 성능부하로 가능 , 즉 현재 수행중인 작업의 남은 시간 + 남아 있는 작업의 수행시간 , 따라서 trivial 선점된 트랜젝션이 resume 됐을 때는 자원 상황이 변경되었을 수 있기 때문에 작업 집합을 다시 계산해야 함 하지만 , 대부분은 선점 당시와 비슷함 ( 이유는 모르겠음 )
  • WCET 재계산 횟수 최소화 – 성능 향상을 위해서 각 트랜젝션의 WCET 는 쓰기 요청을 받을 당시 자원을 기준으로 예측하게 됨 따라서 다른 트랙젝션이 수행되면 자원의 상황이 바뀌므로 다른 트랜젝션의 WCET 에 영향을 미칠 수 있음 따라서 , WCET 계산의 최소화하기 위해 쓰기 트랜젝션이 발생할 때마다 항상 WCET 를 계산하는 것이 아니고 , 자원을 여러 그룹으로 나누어 같은 자원 그룹내의 자원을 사용하는 트랙젝션에 대해서만 재계산 함

Predictable FTL for Buffer Reordering.ppt Predictable FTL for Buffer Reordering.ppt Presentation Transcript

  • Predictable FTL for Buffer Reordering Hanhong Keum Real-Time Operating Systems Laboratory, Seoul National University, Korea 2009-02-16 disserted by Jaesoo, Lee
  • Outlines
    • Background
      • NAND Flash Memory
      • Petri Net
    • Motivation
    • Solution
      • FTL Modeling
      • Operation Scheduling Algorithm
    • System Model
    • Experiment
  • The Characteristics (1)
    • Architecture
      • Block & Page
        • Number of pages in a block
        • Data area + Spare area in a page
      • Basic operations
        • Read, Write: page unit of operation
        • Erase: block unit of operation
    • Background: NAND Flash Memory
    Spare Page … Spare Page Spare Page Spare Page Spare Page … Spare Page Spare Page Spare Page Spare Page … Spare Page Spare Page Spare Page … Block #0 Block #1 Block #(n-1)
  • The Characteristics (2)
    • Technical challenges
      • Erase-before-write
      • Different access time
        • Erase(x10) > Write(x10) > Read
      • The limitation of numbers of erase/write operations (≈ )
    • Background: NAND Flash Memory
  • FTL (Flash Translation Layer)
    • A device driver of NAND Flash Memory
    • FTL makes NAND Flash Memory act like a block device by hiding the limitations
    • Functions
      • Bad block management
      • Error correction code (ECC)
      • Logical- to-physical addressing
      • Garbage collection
      • Power-off recovery
      • Wear-leveling
    • Background: NAND Flash Memory
    File systems Applications FTL NAND Flash controller NAND Flash System
  • Log Block Scheme
    • FTL uses the log block scheme
    • Background: NAND Flash Memory
    data data data data L0 L1 L2 L3 Logical Address data invalid invalid data P0 P1 P2 P3 data data data data P4 P5 P6 P7 data data (free) (free) P8 P9 P10 P11 No.0 Physical Block Physical Address No.1 Physical Block No.2 Physical Block No.0 Logical Block
  • Garbage Collection
    • Garbage collection reclaims invalid pages to free pages
    • Background: NAND Flash Memory
    data invalid invalid data Free Free Free Free data data Data Block Free Block Log Block invalid invalid
  • Terminology
    • Transaction (also called Job) ≡ A unit of interaction with FTL
      • Two kinds of transaction: read, write
    • Operation ≡ A unit of work that is scheduled and executed by FTL
      • A transaction consists of a set of operations
      • e.g. erase a block, do garbage collection, etc.
    • Resource ≡ Any physical or virtual entity of limited availability within a system
    • Background: NAND Flash Memory
    • Petri Net is a directed bipartite graph
      • Consist of places, transitions, directed arcs
      • Arcs run between places and transitions
      • Places may contain any non-negative number of tokens
      • A distribution of tokens over the places is called a marking
      • A transition may fire whenever there is a token at the end of all input arcs
    Petri Net
    • Background: Petri Net
    2 p 1 p 2 p 3 t 1 2 p 1 p 2 p 3 t 1 after fire place transition token arc (and weight) k
    • Program memory is always restricted to use in portable and embedded systems
      • Buffer, one of the program memory, is used to access to storage device such as disk
    • Recently, NAND Flash Memory is widely used to save huge data and when accessing to NAND Flash Memory, buffer memory is used
    • How about reducing buffer usage by analyzing the characteristics of NAND Flash Memory?
    Motivation
  • Solution
    • When a write transaction is occurred,
      • The kernel informs FTL that it has a buffer block whose contents should be output, and FTL schedules the block for I/O
    • SJF (Shortest-Job-First)
      • *Note) SJF is optimal to minimize average response time
      • A transaction that has the shortest average response time is scheduled first
      • ≡ Minimize average time to occupy buffer by a transaction
      • ≡ Reduce the maximum buffer usage
  • The Requirements for SJF
    • Average response time of each transaction *Assumption(not in the paper) Since variation of average response time of the same operation is small, average response time can be got from WCET of the operations
    • Preemption
      • Preemption is allowed when the average response time of a transaction is shorter than the currently executed one
  • How to get the requirements (1)
    • Average response time of each transaction
      • Finding a set of operations that are going to be executed in a transaction
      • Calculation of average response time of each transaction
        • Simple summation of WCET of each operation in a set
        • *Note) WCET of all of the operations is calculated by static analysis or measurement analysis at offline
    A set of operations
    • Petri Net Modeling
    • Resources
    • Operations
    Offline Online Operation Scheduling Algorithm FTL Model available resources The data structure of FTL WCET of each operation
  • FTL Modeling (1)
    • Operations in FTL can be divided into four categories
      • I/O processing
        • a page write
      • Changing state of a log group
        • active or inactive state
        • new log block allocation
      • Garbage collection
        • garbage collection for meta blocks or log blocks
      • Changing state of physical block
        • erasing a block
        • wear-leveling for a free block
  • FTL Modeling (2)
    • Writing a single page ( writePage )
      • Write data(a page) to the available log page
      • The target log group is required to be in an active state
      • Consumes a free log page resource
    • Allocating new log block ( getNewLog )
      • Allocate a free block for a new log block
      • Log page resources are newly created
  • FTL Modeling (3)
    • Make an active log group ( makeActive )
      • Unprotect a log group for write
      • The state of the log group is changed from inactive to active
    • Making a room for active log group ( makeInactive )
      • Produce an active log group slot resource
      • By changing the state of a victim active log group to inactive
  • FTL Modeling (4)
    • Wear-leveling ( WLFBlk )
    • Erasing a block ( eraseFBlk )
    • Garbage collection ( SelfCompaction )
  • Petri Net Model of FTL
  • Operation Scheduling Algorithm
    • Algorithm
      • Propagate the token demanded on p 1 until finding an enabled transition using DFS(Depth-First-Search) way
      • Fire it, and repeat until there is no more demand
      • The series of fired transitions are the solution
    • Time complexity is O(n) -> low overhead
    • For example,
    step p 1 p 2 p 3 p 4 p 5 p 6 p 7 p 8 transition (1) 0 0 0 1 1 1 1 0 t 2 (2) 0 1 0 1 0 1 1 0 t 3 (3) 0 1 1 1 0 0 0 0 t 1 result 1 0 0 0 0 0 0 0
  • How to get the requirements (2)
    • Preemption
      • It is required to predict the remaining execution time of the currently executed transaction at run-time to compare with a newly arrived transaction
        • The remaining execution time of the currently executed operation + the WCET of the remaining operations
      • Should recalculate the operation set when the preempted transaction is resumed, since available resources may be changed
        • But, mostly same before preemption
  • Etc. - Minimizing the Number of WCET Recalculation
    • WCET of each transaction is calculated based on the available resource at that time when a transaction is occurred
      • WCET recalculation of transactions is required after finishing execution of other transaction, since the available resource may be changed
    • But, recalculation is needed only when the resource conflict
    • To minimize the number of WCET recalculation
      • Using the resource domain
  • System Model FTL Transaction info. WCET of transaction data Buffer Memory … SJF scheduling Buffer reordering Buffer Manager Operation Scheduling Algorithm Operation Schedule
  • Experiment
    • Average bitrate vs. buffer memory usage
      • Over 60% reduction when more than 1MB was used
  • Thank You!!!