DOI QR코드

DOI QR Code

A Performance Evaluation on Classic Mutual Exclusion Algorithms for Exploring Feasibility of Practical Application

실제 적용 타당성 탐색을 위한 고전적 상호배제 알고리즘 성능 평가

  • 이형봉 (강릉원주대학교 컴퓨터공학과) ;
  • 권기현 (강원대학교 전자정보통신공학부)
  • Received : 2017.05.29
  • Accepted : 2017.10.13
  • Published : 2017.12.31

Abstract

The mutual exclusion is originally based on the theory of race condition prevention in symmetric multi-processor operating systems. But recently, due to the generalization of multi-core processors, its application range has been rapidly shifted to parallel processing application domain. POSIX thread, WIN32 thread, and Java thread, which are typical parallel processing application development environments, provide a unique mutual exclusion mechanism for each of them. Applications that are very sensitive to performance in these environments may want to reduce the burden of mutual exclusion, even at some cost, such as inconvenience of coding. In this study, we implement Dekker's and Peterson's algorithm in the form of busy-wait and processor-yield in various platforms, and compare the performance of them with the built-in mutual exclusion mechanisms to evaluate the usability of the classic algorithms. The analysis result shows that Dekker's algorithm of processor-yield type is superior to the built-in mechanisms in POSIX and WIN32 thread environments at least 2 times and up to 70 times, and confirms that the practicality of the algorithm is sufficient.

상호배제는 원래 다중처리기 시스템을 지원하는 운영체제의 경쟁상황 예방 이론에서 출발하였으나, 최근에는 다중코어처리기의 일반화로 그 적용범위가 급격하게 병렬처리 어플리케이션 영역으로 이동되었다. POSIX 스레드, WIN32 스레드, Java 스레드 등이 대표적인 병렬 처리 어플리케이션 개발환경인데, 이들은 각자 고유한 상호배제 메커니즘을 제공하고 있다. 이들 환경에서 성능에 매우 민감한 어플리케이션들은 코딩의 불편함 등 약간의 희생을 감수하더라도 상호배제를 위한 부담 경감을 필요로 할 수 있다. 이 연구에서는 두 스레드 사이에서 Dekker와 Peterson 알고리즘을 플랫폼별로 바쁜 대기와 처리기 양보 형태로 구현하여 각각의 고유 상호배제 메커니즘들과의 성능을 비교하고, 그 알고리즘들의 유용성을 평가한다. 분석 결과 POSIX 및 WIN32 스레드 환경에서 처리기 양보 형 Dekker 알고리즘이 최소 2배에서 최대 70배까지 우수한 것으로 나타나 이 알고리즘의 실용성이 충분한 것으로 확인되었다.

Keywords

References

  1. A. Silberschatz, P. B. Galvin, and G. Gagne, "Operating System Concepts," 9th Ed., pp.278-280, Wiley, 2013.
  2. Young-Suk Lee, Young-Ho Nam, "A Study on Instruction Method for Mutual Exclusion Using Simulation Based on Graphic," The Journal of Korean Association of Computer Education, Vol.13, No.6, pp.9-21, 2010.
  3. Microsoft, "Lockless Programming Considerations for Xbox 360 and Microsoft Windows," [Internet], https://msdn.microsoft.com/en-us/library/windows/desktop/ee418650(v=vs.85).aspx (accessed at May 15th, 2017).
  4. Geoff Langdale, "Lock-Free Programming," [Internet], https://www.cs.cmu.edu/-410-s05/lectures/L31_LockFree.pdf (accessed at May 15th, 2017).
  5. E. W. Dijkstra, "About the sequentiality of process descriptions (EWD-35)," E.W. Dijkstra Archive. Center for American History, University of Texas at Austin, 1962-1963 (http://www.cs.utexas.edu/users/EWD/translations/EWD35-English.html, accessed at May 15th, 2017).
  6. G. L. Peterson, "Myths About the Mutual Exclusion Problem," Information Processing Letters, Vol.12, No.3, pp.115-116, 1981. (http://cs.nyu.edu/-lerner/spring12/Read03-Mutual Exclusion.pdf, accessed at May 15th, 2017). https://doi.org/10.1016/0020-0190(81)90106-X
  7. S. H. Park and S. H. Lee, "Token-Based Mutual Exclusion Algorithm in Mobile Cellular Networks," Proc. of 26th International Conference on Advanced Information Networking and Applications Workshops, pp.460-465, 2012.
  8. S. H. Park, Y. M. Kim, and S. C. Yoo, "A Design of Mutual Exclusion Protocol for Mobile Game in Cellular Wireless Networks," Journal of the Korea Entertainment Industry Association, Vol.10, No.6, pp.431-438, 2016. https://doi.org/10.21184/jkeia.2016.12.10.6.431
  9. A. Luo, W. Wu, J. Cao, and M. Raynal, "A Generalized Mutual Exclusion Problem and Its Algorithm," Proc. of 42nd International Conference on Parallel Processing(ICPP), IEEE, pp.300-309, 2013.
  10. F. Cicirelli and L. Nigro, "Modelling and Verification of Mutual Exclusion Algorithms," Proc. of IEEE/ACM 20th International Symposium on Distributed Simulation and Real Time Applications(DS-RT), pp. 136-144, 2016.
  11. X. Ji and L. Song, "Mutual Exclusion Verification of Peterson's Solution in Isabelle/HOL," Proc. of third International Conference on Trustworthy Systems and Their Applications(TSA), IEEE, pp.81-86, 2016.
  12. S. M. Choi and H. B. Lee, "A Study on Mutual Exclusion Algorithms," Proc. of the KIPS Fall Conference 2016, Vol. 23, No.2, pp.38-39, 2016.
  13. H. W. Cain and M. H. Lipasti, "Memory Ordering: A Value-Based Approach," Proc. of 1st Annual International Symposium on Computer Architecture(ISCA), 2004.