Worst Case Timing Analysis for DMA I/O Requests in Real-time Systems

실시간 시스템의 DMA I/O 요구를 위한 최악 시간 분석

  • 한주선 (서울대학교 전기컴퓨터공학부) ;
  • 하란 (홍익대학교 정보컴퓨터공학부) ;
  • 민상렬 (서울대학교 전기컴퓨터공학부)
  • Published : 2005.04.01

Abstract

We propose a technique for finding the worst case response time (WCRT) of a DMA request that is needed in the schedulability analysis of a whole real-time system. The technique consists of three steps. In the first step, we find the worst case bus usage pattern of each CPU task. Then in the second step, we combine the worst case bus usage pattern of CPU tasks to construct the worst case bus usage pattern of the CPU. This second step considers not only the bus requests made by CPU tasks individually but also those due to preemptions among the CPU tasks. finally, in the third step, we use the worst case bus usage pattern of the CPU to derive the WCRT of DMA requests assuming the fixed-priority bus arbitration protocol. Experimental results show that overestimation of the DMA response time by the proposed technique is within $20\%$ for most DMA request sizes and that the percentage overestimation decreases as the DMA request size increases.

CPU의 수행과 병행하여 I/O가 수행되도록 DMA 방식을 채택한 실시간 시스템의 스케줄 가능성을 보장하기 위해서는 CPU 태스크 뿐만 아니라 I/O 요구의 스케줄 가능성도 반드시 검증되어야 한다. 본 논문에서는 CPU에게 최상위 우선순위가 할당된 고정우선순위 버스 프로토콜을 기반으로 CPU와 다수의 DMA 컨트롤러가 시스템 버스를 공유하는 환경에서 DMA I/O 요구의 최악 응답시간을 분석하는 기법을 제안한다. 제안하는 분석 기법의 첫 번째 단계에서는 CPU 상에서 수행 중인 각 CPU 태스크별로 최악 버스 요구 패턴을 구한다. 두 번째 단계에서는 이들 CPU 태스크의 최악 버스 요구 패턴을 모두 통 차해 CPU 전체의 최악 버스 요구 패턴을 구한다. 최종 세 번째 단계에서는 CPU의 최악 버스 요구 패턴으로부터 DMA 컨트롤러의 버스 가용량을 구하고 DMA I/O 요구의 최악 응답시간을 산출한다. 모의 실험을 통해 제안하는 분석 기법이 일반적인 DMA 전송량에 대해 $20\%$ 오차 범위 이내에서 안전한 응답시간을 산출하며, DMA 전송량이 증가할수록 오차가 점차 감소함을 보였다

Keywords

References

  1. Joseph, M. and Pandya, P., 'Finding Response Times in a Real-Time System,' The BCS Computer Journal, Vol. 29, No.5, pp. 390-395, 1986 https://doi.org/10.1093/comjnl/29.5.390
  2. Lehoczky, J. P., Sha, L. and Ding, Y., 'The Rate Monotonic Scheduling Algorithm - Exact Characterization and Average Case Behavior,' In Proceedings of the 10th Real-Time Systems Symposium, pp. 166-171, 1989 https://doi.org/10.1109/REAL.1989.63567
  3. C. L. Liu and J. W. Layland, 'Scheduling Algorithm for Multiprogramming in Hard Real Time Environment,' Journal of ACM, Vol. 20, pp. 46-61, Jan., 1973 https://doi.org/10.1145/321738.321743
  4. Tindell, K. W., Burns, A. and Wellings, A. J., 'An Extendable Approach for Analyzing Fixed Priority Hard Real-Time Tasks,' Real-Time Systems, Vol. 6, No. 2, pp. 133-151, 1994 https://doi.org/10.1007/BF01088593
  5. Hahn, J., Ha, R., Min, S. L. and Liu, J. W. -S., 'Analysis of Worst Case DMA Response Time in Fixed-Priority Bus Arbitration Protocol,' Real-Time Systems, Vol. 23, No. 3, pp. 209-238, 2002 https://doi.org/10.1023/A:1020227912579
  6. Huang, T.-Y., Worst-Case Timing Analysis of Concurrently Executing DMA I/O and Programs, Ph.D. thesis, University of Illinois, 1997
  7. Lee, C.-G., Hahn, J., Seo, Y.-M., Min, S. L., Ha, R., Hong, S., Park, C. Y., Lee, M. and Kim, C. S., 'Analysis of Cache-related Preemption Delay in Fixed-priority Preemptive Scheduling,' In Proceedings of the 17th Real-Time Systems Symposium, pp. 264-274. 1996 https://doi.org/10.1109/REAL.1996.563723
  8. Lee, C.-G., Hahn, J., Seo, Y.-M., Min, S. L., Ha, R., Hong, S., Park, C. Y., Lee, M. and Kim, C. S., 'Enhanced Analysis of Cache-related Preemption Delay in Fixed-priority Preemptive Scheduling,' In Proceedings of the 18th Real-Time Systems Symposium, pp. 187-198. 1997 https://doi.org/10.1109/REAL.1997.641281