Array Localization for Multithreaded Code Generation

다중스레드 코드 생성을 위한 배열 지역화

  • 양창모 (동명전문대학 전자계산과) ;
  • 유원희 (인하대학교 전자계산공학과)
  • Published : 1996.11.01

Abstract

In recent researches on thread partitioning algorithms break a thread at the long latency operation and merge threads to get the longer threads under the given constraints. Due to this limitation, even a program with little parallelism is partitioned into small-sized threads and context-swithings occur frequently. In the paper, we propose another method array localization about the array name, dependence distance(the difference of accessed element index from loop index), and the element usage that indicates whether element is used or defined. Using this information we can allocate array elements to the node where the corresponding loop activation is executed. By array localization, remote accesses to array elements can be replaced with local accesses to localized array elements. As a resuit,the boundaries of some threads are removed, programs can be partitioned into the larger threads and the number of context switchings reduced.

지금까지 다중스레드 모델을 위한 다중스레드 코드의 생성 및 스레드 분할에 대 하여 이루어진 연구는 실행시간을 번역시간에 예측할 수 없는 연산을 경계로 삼아 스 레드를 분할하고, 스레드의 길이를 증가시키기 위하여 주어진 제약조건내에서 스레드 를 병합하는 것이다. 이러한 정책으로 인하여 병렬성이 적은 프로그램이라 하여도 원 격자료 접근이 많으면 스레드의 길이가 짧아지고 그에 따라 문맥전환이 늘어나기 때 문에 시스템에 부담이 된다. 본 논문에서는 스레드의 길이를 늘이고, 메세지 전송횟 수를 감소시키기 위한 다른 방법으로 프로그램의 루프에서 접근되는 배열의 첨자를 분석하고 이를 바탕으로 루프 액티베이션에서 참조되는 배열의 원소를 해당 루프 액 티베이션이 수행되는 노드에 분산 저장하는 배열의 지역화방안을 제안한다. 배열을 지역화하기 위하여 먼저 루프 액티베이션에서 접근되는 배열의 이름, 루프 첨자와 접 근되는 배열원소의 첨자간의 차이인 종속거리 그리고 배열원소의 용도에 관한 정보를 얻기 위한 원소 접근 형태 분석을 수행한다. 원소 접근 형태 분석으로 부터 얻어진 정보를 이용하여 가능한한 지역 기억장치에서 필요한 배열의 원소를 읽어올 수 있도 록 배열 원소에 접근하는 루프 액티베이션이 수행되는 처리기 모임의 지역 기억장치 에 배열원소를 저장하는 배열 지역화를 수행한다. 실험결과, 배열을 지역화함으로써 다른 처리기 모임의 지역 기억장치로부터 배열의 원소를 읽어오기 위한 원격자료 접 근을 지역자료 접근으로 대치함으로써 원격접근의 수가 줄어든다. 이로 인하여 스레 드의 길이가 증가하며, 원격접근 횟수 및 문맥 전환의 수가 줄어들어 시스템의 성능 향상을 꾀할 수 있었다.

Keywords