77280

THREAD EFFICENCY ON SHARED MEMORY SYSTEMS

Научная статья

Информатика, кибернетика и программирование

Bkhterev IMM UrB RS It is trdition to think tht computtion decomposition into tsks executed in prllel on the shred memory systems is more effective with threds but not with processes. Usully this point of view grounds on tht the switching cpu execution context between processes is more expensive thn the switching between threds. If it is specified then it is execution context ssocited wit TLB Trnsltion Lookside Buffer which should be reset nd filled with new vlues when the processor is being switched between execution of different...

Английский

2015-02-02

22.5 KB

0 чел.

THREAD EFFICENCY ON SHARED MEMORY SYSTEMS

M.O. Bakhterev

IMM UrB RAS

It is tradition to think that computation decomposition into tasks executed in parallel on the shared memory systems is more effective with threads, but not with processes. Usually this point of view grounds on that the switching cpu execution context between processes is more expensive than the switching between threads. But telling about such an expenses they rarely specify what exactly this execution context is. If it is specified, then it is execution context associated wit TLB (Translation Lookaside Buffer), which should be reset and filled with new values when the processor is being switched between execution of different processes, and which may be left unmodified when being switched between threads of the same process. However, such reasoning does not take following into account.

1. The majority of processor architectures with virtual memory support allows to store in TLB translations for different processes. It is achieved with support of segmentation or address space management logic. And so was SPARC processors, in operating system for which (SunOS 4.x) for the first time there was introduced support for modern version of threads. Most likely, SUN Microsystems suggested thread support indeed to solve the problem with excessively high overhead of switching execution context between processes. But that context was associated not with TLB, but with processor's caches, which was virtually addressed. Such a caches are rarely found in modern processors.

2. TLB capacity is limited. So the processing of large volumes of data, which usually emerge in supercomputations, demands intensive updates of TLB during calculation in the case of threads usage too.

3. A common address space, assumed by the threads execution semantic, costs «nothing» only when threads are executed on uniprocessor (one TLB). When threads are executed on the set of many processors, for every operation with address space: memory allocation and freeing, stack expansion -- the coordinated TLB management on all processors, involved in computation, is needed. And that management demands execution of critical sections and even threads interruption in some cases (for instance, memory deallocation). Besides, additional overhead may be connected with common address space structure complexity. Even the program does not assume shared access to some areas of that space, their allocation and release should be coordinated between threads. Each allocation herewith complicates the space structure and increases execution time of the subsequent operations with memory.

Thus, there are two overhead kinds associated with threads and processes. From processes' side: greater operations with TLB intensity. From threads': additional complexity of common address space support. It is not clear a priori, which mathematical model allows to decide, which kind of overhead is less expensive. So we compared this overheads experimentally. For that purpose there were written multithreaded and multiprocessed versions of programs for four different computational loads: the multiplication of row-stored and tile-stored matricies, memory management, calculation with intensive data exchange. Our results shows, that in many cases threads are not only less effective tool for computation decomposition into tasks, but are significantly lose this efficiency to processes.


 

А также другие работы, которые могут Вас заинтересовать

3479. Определение коээфициента поверхностного натяжения жидкости по способу отрыва капли 185 KB
  Определение коээфициента поверхностного натяжения жидкости по способу отрыва капли Приборы и принадлежности: Бюретка с краном на штативе, два стакана, воронка, вода, исследуемая жидкость (спирт). Теория работы и описания приборов Жидкость состоит из...
3480. Физика среды и ограждающих конструкций, Строительная теплофизика 206 KB
  Физика среды и ограждающих конструкций. Среда и ее воздействие на объекты строительства. Воздушная среда и ее параметры. Водная среда и ее параметры. Климатические факторы. Влияние среды на долговечность строительных конструкций...
3483. Медична генетика 638 KB
  Залежність прояву ознак від впливу зовнішніх умов відзначав ще Ж.-Б.Ламарк, який розглядав це як один із еволюційних факторів. Учені давно помітили, що однояйцеві близнята, тобто організми з однаковим генотипом, відрізняються фенотипно, якщо розвива...
3484. Лекційний курс з основ фізики 2.71 MB
  Тема 1. Фізичні основи механіки. Кінематика Лекція 1. Основи кінематики поступального та обертального рухів Основні визначення В механіці розглядають механічний рух. Під механічним рухом розуміють зміну з часом положення тіла відносно інших тіл в пр...
3485. Измерение скорости пули с помощью физического маятника 55.8 KB
  Измерение скорости пули с помощью физического маятника Цель работы: с помощью физического маятника определить скорость пули. Рабочую формулу для экспериментального определения скорости пули получить исходя из законов сохранения момента импульса и эн...
3486. Определение ускорения свободного падения при помощи оборотного и математического маятников 443.96 KB
  Определение ускорения свободного падения при помощи оборотного и математического маятников, изучение законов колебания маятника, ознакомление с косвенными методами измерения ускорения свободного падения при помощи математического и оборотного...
3487. Бухгалтерский учёт хозяйственных процессов 391 KB
  Бухгалтерский учёт хозяйственных процессов Введение Бухгалтерский учёт представляет собой упорядоченную систему сбора и обобщения информации в денежном выражении об имущес...