13.07.2015 Views

WWW/Internet - Portal do Software Público Brasileiro

WWW/Internet - Portal do Software Público Brasileiro

WWW/Internet - Portal do Software Público Brasileiro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

IADIS International Conference <strong>WWW</strong>/<strong>Internet</strong> 2010It is assumed that the set of jobs is given, ω is the total elapsed time to finish the jobs, the order ofrunning jobs obeys the schedule and ω0is the shortest time which is running and also obeying the optimalschedule. The schedule has been realized by means of a trial-and-error method. The slowness, namely theratio of ω to ω0, can be expressed in the following inequality (2) shown below,ω ≤ 2 − 1-- (2)ω0where n denotes the number of processors. It seems that the right side expression of inequality (2) can alsogive the upper bound of the above ratio, namely the left side of the inequality.Therefore, if the jobs are allocated to the workers in the order of the job raised, the total elapsed time is atmost <strong>do</strong>uble of the time by optimal schedule. Generally speaking, it is necessary to consider some overheadthat includes communication and synchronization between master and each worker. It is assumed that suchan overhead can be neglected in this subsection. Of course, some overheads may control performance andefficiency. So targets for parallel computing are very important. The next subsection will illustrate a detail ofpractical parallel programming.This subsection illustrates two types of parallel programming examples. One is a programming examplefor Risa/Asir on the CPU with 4 processor cores. And another is for CELL B.E. of PLAYSTATION 3. In theformer case, programs must be written in a special programming language for Risa/Asir. It is an open sourcegeneral computer algebra system. OpenXM committers have been developing its Kobe distribution. Theoriginal Risa/Asir was developed at Fujitsu Labs LTD during Japan national project of the fifth generationcomputer [8]. In the latter case, programs are to be written in the C programming language for the CellMultiprocessor [9]. These are explained in detail as follows.3.1 Case(I): a Programming Example for Risa/AsirParallel programs for the computer algebra system called Risa/Asir are to be described as follows:1) Invoke an "asir" process and assign it to one of workers.2) Load a program code to the according worker process.3) Execute such a program on the process.4) Wait for termination of each worker's program and receive the computing result.Process assignment is automatically performed by means of load balancing facility of the operatingsystem. Namely users <strong>do</strong> not need to be aware of such a complicated operation. The computer algebra systemRisa/Asir <strong>do</strong>es not request users to revoke (destroy) each worker process. A master process can investigatewhether an according worker process terminate or not, so it is very efficient for users to write a good parallelprogram to reassign a next task onto vacant (idling) worker.3.2 Case(II): a Programming Example for Cell MultiprocessorParallel programs for Cell B.E. with SPE library (ver2) on Sony-produced PLAYSTATION3 are to bedescribed as follows:1) Load a program code for worker process onto memory.2) Allocate each code onto the according SPE(Synergistic Processor Element)3) Invoke a thread and give an instruction to execute a program for worker in the thread.4) Wait for termination of each thread which finishes when the according worker program is terminated.5) Revoke each worker process.Users must utilize each worker by means of an invocation of thread. This is why a function gives aninstruction to execute programs for workers but it <strong>do</strong>es not send back its return values until programs forworkers terminate. In the Cell Multiprocessor, SPE can play a role to perform data passing by means ofDMA transfer. So programs for workers, which are running in SPEs, can move several kinds of data from themain memory to local storage by means of DMA operation. After they has processed those data, they canrestore data in reverse, namely from their local storages to the main memory, through DMA channel.n259

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!