DOI QR코드

DOI QR Code

멀티코어 환경에서 비실시간 메시지의 응답시간 지연을 최소화하는 리눅스 기반 메시지 처리기의 설계 및 구현

Design and Implementation of a Linux-based Message Processor to Minimize the Response-time Delay of Non-real-time Messages in Multi-core Environments

  • 왕상호 (서강대학교 컴퓨터공학과) ;
  • 박영훈 (서강대학교 컴퓨터공학과) ;
  • 박성용 (서강대학교 컴퓨터공학과) ;
  • 김승춘 (한화탈레스) ;
  • 김철회 (방위사업청) ;
  • 김상준 (국방과학연구소 지휘통제체계단) ;
  • 진철 (국방과학연구소 지휘통제체계단)
  • 투고 : 2016.08.10
  • 심사 : 2016.11.25
  • 발행 : 2017.02.15

초록

메시지 처리기란 다양한 클라이언트로부터 오는 메시지를 받아 처리하는 서버 소프트웨어이며, 메시지의 종류에 따라 마감기한 이내에 처리해야 하는 실시간 메시지와 비실시간 메시지를 처리한다. 최근 마이크로프로세서 기술의 발전과 리눅스의 빠른 보급에 따라 메시지 처리기는 멀티코어 기반의 리눅스 서버에서 구현되고 있으며, 멀티코어 환경에서는 코어를 효율적으로 사용해야 시스템의 성능을 극대화 시킬 수 있다. 멀티코어를 효율적으로 사용하기 위한 다양한 실시간 스케줄러가 제안되어 있지만, 많은 연구들이 이론적 분석이나 시뮬레이션에 국한되어 있고, 리눅스를 위해 제안된 일부 알고리즘들도 커널을 수정하거나 특정 커널 버전에서만 동작된다는 단점이 있다. 본 논문에서는 멀티코어 환경에서 쓰레드를 사용자 수준에서 코어에 직접 매핑하는 리눅스 기반 메시지 처리기의 구조를 제안한다. 구현된 메시지 처리기에서는 기존의 RM(Rate Monotonic) 알고리즘을 수정하여 사용하였고, 특정 코어에 최대한 실시간 메시지를 몰아서 처리하도록 First fit 기반의 빈패킹(Bin-Packing) 알고리즘을 사용하여, 실시간 메시지의 위배율을 보장하면서 비실시간 메시지의 응답시간의 지연을 최소화하였다. 성능평가를 위하여 LITMUS 프레임 워크에서 제공하는 2가지 멀티코어 스케줄링 알고리즘(GSN-EDF, P-FP)을 이용하여 메시지 처리기를 구현한 후 제안된 시스템과 비교한 결과, 비실시간 메시지의 응답시간이 2가지 알고리즘 대비 최대 17~18%까지 향상되는 것을 확인하였다.

A message processor is server software that receives non-realtime messages as well as realtime messages from clients that need to be processed within a deadline. With the recent advances of micro-processor technologies and Linux, the message processor is often implemented in Linux-based multi-core servers and it is important to use cores efficiently to maximize the performance of system in multi-core environments. Numerous research efforts on a real-time scheduler for the efficient utilization of the multi-core environments have been conducted. Typically, though, they have been conducted theoretically or via simulation, making a subsequent real-system application difficult. Moreover, many Linux-based real-time schedulers can only be used in a specific Linux version, or the Linux source code needs to be modified. This paper presents the design of a Linux-based message processor for multi-core environments that maps the threads to the cores at user level. The message processor is implemented through a modification of the traditional RM algorithm that consolidates the real-time messages into certain cores using a first-fit-based bin-packing algorithm; this minimizes the response-time delay of the non-real-time messages, while guaranteeing the violation rate of the real-time messages. To compare the performances, the message processor was implemented using the two multi-core-scheduling algorithms GSN-EDF and P-FP, which are provided by the LITMUS framework. The benchmarking results show that the response-time delay of non-real-time messages in the proposed system was improved up to a maximum of 17% to 18%.

키워드

과제정보

연구 과제번호 : 소프트웨어 동적 재구성 및 고속 데이터 처리 최적 설계 효과 분석 연구

연구 과제 주관 기관 : 국방과학연구소

참고문헌

  1. C. S. Pabla, "Completely Fair Scheduler," Linux Journal, 2009.
  2. A. Garg, "Real-Time Linux Kernel Scheduler," Linux Journal, 2009.
  3. J. P. Lehoczky, L. Sha, and Y. Ding, "The Rate Monotonic Scheduling Algorithm: Exact Characterization and Average Case Behavior," Proc. of the IEEE Real-Time System Symposium, pp. 166-171, 1989.
  4. G. C. Buttazzo, "Rate Monotonic vs. EDF: Judgment Day," Real-Time Systems, pp. 5-26, 2005.
  5. J. Lelli, D. Faggioli, T. Cucinotta, and G. Liparti, "An Experimental Comparison of Different Realtime Schedulers on Multicore Systems," The Journal of Systems and Software, Vol. 85, No. 10, pp. 2405-2416, Oct. 2012. https://doi.org/10.1016/j.jss.2012.05.048
  6. S. K. Kato, R. R. Rajkumar, and Y. Ishikawa, "A Loadable Real-Time Scheduler Framework for Multicore Platforms," Submitted to Real-Time Computing Systems and Applications (RTCSA), 2010.
  7. P. B. Sousa, N. Pereira, and E. Tovar, "Enhancing the Real-time Capabilities of the Linux Kernel," ACM SIGBED Review, Vol. 9, No. 4, pp. 45-48, Nov. 2012. https://doi.org/10.1145/2452537.2452546
  8. J. Lelli, D. Faggioli, T. Cucinotta, and S. Superiore, "An Efficient and Scalable Implementation of Global EDF in Linux," Proc. of the 7th Annual Workshop on Operating Systems Platforms for Embedded Real-Time applications, pp. 6-15, 2011.
  9. J. Calandrino, H. Leontyev, A. Block, U. Devi, and J. Anderson, "LITMUSRT: A Testbed for Empirically Comparing Real-Time Multiprocessor Schedulers," Proc. of the 27th IEEE Real-Time Systems Symposium, pp. 111-123, 2006.
  10. V. Yodaiken, "The RTLinux Manifesto," Proc. of the 5th Linux Expo, 1999.
  11. S. Lauzac, R. Melhem, and D. Mosse, "Comparison of Global and Partitioning Schemes for Scheduling Rate Monotonic Tasks on a Multiprocessor," Proc. of the 10th Euromicro Workshop on Real-Time Systems, pp. 188-195, 1998.
  12. J. H. Anderson and A. Srinivasan, "Pfair Scheduling: Beyond Periodic Task Systems," Proc. of the 7th International Workshop on Real-Time Computing Systems and Applications, pp. 297-306, 2000.
  13. S. Baruah, "The Partitioned EDF Scheduling of Sporadic Task Systems," Proc. of the 32nd IEEE Real-Time Systems Symposium, pp. 116-125, 2011.
  14. K. Lakshmanan, R. Rajkumar, and J. P. Lehoczky, "Partitioned Fixed-Priority Preemptive Scheduling for Multi-Core Processors," Proc. of the 21st Euromicro Conference on Real-Time Systems, pp. 239-248, 2009.
  15. B. Andersson and J. Jonsson, "The Utilization Bounds of Partitioned and Pfair Static-Priority Scheduling on Multi-processors are 50%," Proc. of the Euromicro Conference on Real-Time Systems, pp. 33-40, 2003.
  16. S. Kato and N. Yamasaki, "Portioned Static-Priority Scheduling on Multiprocessors," Proc. of the 22nd IEEE International Parallel and Distributed Processing Symposium, pp. 1-12, 2008.
  17. S. Kato and N. Yamasaki, "Semi-Partitioned Fixed-Priority Scheduling on Multiprocessors," Proc. of the 15th IEEE Real-Time and Embedded Technology and Applications Symposium, pp. 23-32, 2009.
  18. Tousimojarad, A. and Vanderbauwhede, W., "An Efficient Thread Mapping Strategy for Multiprogramming on Manycore Processors," Parallel Computing: Accelerating Computational Science and Engineering(CSE), Advances in Parallel Computing, pp. 63-71, 2014.
  19. E. H. M. Cruz, M. Diener, M. A. Z. Alves, and P. O. A. Navaux, "Dynamic thread mapping of shared memory applications by exploiting cache coherence protocols," Journal of Parallel and Distributed Computing, Vol. 74, No. 3, pp. 2215-2228, Mar. 2014. https://doi.org/10.1016/j.jpdc.2013.11.006