并行计算期末考试模拟题原题Word文档格式.docx

上传人:b****8 文档编号:22488321 上传时间:2023-02-04 格式:DOCX 页数:10 大小:19.53KB
下载 相关 举报
并行计算期末考试模拟题原题Word文档格式.docx_第1页
第1页 / 共10页
并行计算期末考试模拟题原题Word文档格式.docx_第2页
第2页 / 共10页
并行计算期末考试模拟题原题Word文档格式.docx_第3页
第3页 / 共10页
并行计算期末考试模拟题原题Word文档格式.docx_第4页
第4页 / 共10页
并行计算期末考试模拟题原题Word文档格式.docx_第5页
第5页 / 共10页
点击查看更多>>
下载资源
资源描述

并行计算期末考试模拟题原题Word文档格式.docx

《并行计算期末考试模拟题原题Word文档格式.docx》由会员分享,可在线阅读,更多相关《并行计算期末考试模拟题原题Word文档格式.docx(10页珍藏版)》请在冰豆网上搜索。

并行计算期末考试模拟题原题Word文档格式.docx

Networktopology,

diameterofanetwork,

Bisectionwidth,

datadecomposition,

taskdependencygraphs

granularity

concurrency

process

processor,

lineararray,

mesh,

hypercube,

reduction,

prefix-sum,

gather,

scatter,

threads,

mutualexclusion

sharedaddressspace,

synchronization,

thedegreeofconcurrences

Dualofacommunicationoperation,

2问答题。

Chapter1第1■章

1)Whyweneedparallelcomputing?

1)为什么我们需要并行计算?

答:

2)Pleaseexplainwhatarethemaindifferencebetweenparallelcomputingandsequentialcomputing2)解释并行计算与串行计算在算法设计中的主要不同点在那里?

答:

Chapter2第2章

1)WhatareSIMD,SPMDandMIMDdenote?

1)解释SIMD,SPMD和MIMD是什么含义。

2)PleasedrawatypicalarchitectureofSIMDandatypicalarchitectureofMIMDtoexplan.

2)请绘制一个典型的SIMD的体系结构和MIMD的架构。

3)WhatarethetwotypicalcommunicationmodelsofParallelPlatforms?

YoucangiveashortintroductiononMassagePassingandSharedaddressspacemodels・

3)并行平台的两个典型的通信模式是什么?

你可以给一个简短的介绍信息传递和共享地址空间模型。

能说岀MassagePassing和Sharedaddressspacemodels两种通讯模型。

4)Intheidealparallelrandomaccessmachine(PRAM),whatarethemeaningofEREW,CREWandCRCW?

4)在理想并行计算模型中(parallelrandomaccessmachine(PRAM),EREW,CREW,和CRCW表示的意思是什么?

Chapter3第3章

1)Beabletoexplainatleast2kindsofthebasicdecompositiontechniques,i・e・,Recursivedecomposition,Datadecomposition,ExplorationdecompositionandSpeculativedecomposition.

1)能够解释的基本的把问题分解技术,至少有2种,例如,递归分解,数据分解,探索分解和投机分解。

(D递归分解,如快速排序

(2)数据分解,矩阵乘法.矩阵与向量的乘法,按行或格网的数拯划分。

(3)探索分解,人工智能中的状态空间的问题求解、如16数码问题。

(4)投机分解,利用处理器大多数时间处于空闲的特点,把后而可以先计算的任务,提前计算出,在许多情况下会加速程序的运行。

如对case,if语句的句子同时计算岀来。

2)Whentheworkbalanceoftasksbecomebed,whichisscheduledbasedondatadecomposition,whatmethodscanimprovetheworkbalanceoftasks,block-cyclicdistribution,Randomizedblock

distributionsandgraphpartitioning.

2)当平衡工作的任务成为基于数据分解,有什么方法可以改善平衡工作的任务。

对稀疏矩阵或在同一数据集合上,操作密度不同的计算,如何达到调度平衡的问题,具体方法是什么:

(l)block-cyclicdistr让ution(采用在一个矩阵上循环安排任务计算完成的方法)

(2)对矩阵的下标采用随机映射的方法(3)图划分的方法

Chapter4第4章

1)Befamiliarwiththebasiccommunicationoperationsaswellastheirimplementationsonthetypicalmodels,hypercube,lineararrayandmesh(graphicaldescription)

1)熟悉的基本通信业务,以及对他们的典型模式实现,超立方体,线性阵列和网状(图形描述)

onetoallbroadcast;

alltoonereduction

alltoallbroadcast;

alltoallreduction

scatter,gather,allreduce,prefixsum,

alltoallpersonalizedcommunication・Circularshift

个人认为以下的1-4更为重要,算法实现没必要记住,但是要知道每个操作具体是怎么做的

2)beabletousebasiccommunicationoperationtodesignparallelalgorithms,e.g・matrix-vectormultiplication,shortestpathtreesandminimumspanningtree・

2)能使用基本的通信操作设计并行算法,例如:

矩阵向量乘法,最短路径树和最小生成树。

Chapter5第5章

1)Theformulaeofspeedup,efficiencyandcostofaparallelalgorithmandbeabletogiveashortexolaination.

1)并行算法的加速,效率和成本的计算公式,并能给出一个简短解释。

(1)知道并行算法的分析测度,以及相应的测度计算公式。

(2)并行算法并行加速比S,S二Ts/Tp,Tp和Ts表示并行算法和串行算法的时间复杂性。

(3)效率E=E二S/p二Ts/(Tp*p),

(4)费用cost=P*Tp

2)TheproofonAmdahl*slaw:

IfaproblemofsizeWhasaserialcomponentWs,provethatW/Wsisanupperboundonitsspeedup,nomatterhowmanyprocessingelementsareused・

2)Amdahl定理的证明:

设W表示某算法A求解问题的全部工作量,W=Ws7p,其中Ws表示必须串行计算的工作豊Wp表示可以并行计算的工作虽试证明该算法的并行加速比的上界是W/Ws,无论有多少个处理单元。

Chapter6第6章

1)BeabletodescribetheprogramarchitectureofaMPIprogram・

1)能够来描述程序的MPI程序架构。

^include<

mpi・h>

Main(intargc,char*argvEJ)

intnpes,myrank;

MPI_init(Sargc,Sargv);

MPI_Comm_szie(MPI_C0MM_W0RLD,&

npes);

>

PI_Comm_rank(MPI_C0MM_W0RLD,&

myrank);

并行程斥代码部分

通讯结束部分

MPI.FinilizeO

}

2)fundimentalfunctionsforMPI

a)MPI_Initestablishingaparallelcomputationalenvironment

b)MPI_Finalizeclosesallparalleltasks

c)MPI_Comm_sizegetthenumberofprocessesavailable

d)MPI_Comm_rankgettheidofprocess

e)MPI_sendmessagesendingfunctions

f)MPI_Recvmessagereceivingfunctions

2)了解MPI的基本函数

1)NfPI.INIT建立一个并行计算环境

2)MPI_Finalize关闭所有并行任务

3)MPI_Conrni_size获得可用的进程数

4)MPI_Comm_rank得到进程ID

5)NfPI.send消息发送功能

6)MPI.Recv消恵接收功能

3)Blockingandnon-blockmessagepassinginMPI_Send・

a)ReturnonlyafterthecorrespondingMPI_Recvhavebeenissuedandthemessagehasbeensenttothereceiver(blocking)completely.

b)Initializeaprocesstocopythemessageintoabufferofthedestinationandthenreturn(non-blockingwithabuffer)withoutwaitingthefinishofthedatatransformation・

PleasegivethecorrespondingsentencesforthetwokindsofmassagepassinginHPI・

3)能说明在MPI_Send中的阻塞的消息传递(blockingMessagePassing)和无阻塞的消息传递(Non-blockingMessagePassing)的含义和具体如何实现的。

1)只返回相应的MPI.Recv后已经下达,消息被发送到接收器(阻塞)完全。

2)初始化一个流程来复制到缓冲区的消息的目的地,然后返回(无阻塞/非阻塞方式的缓冲区)无需等待完成的数据转换。

请给相应的句子的两种消息传入MPIo

Chapter7第7章

1)BeabletodescribetheprogramarchitectureofaPthreadprogram

1)说明一般利用Pthread编程的程序基本结构(包含那几个语句)。

IEEE指疋的一个标准的线程API,POSIXAPI。

POSIX也称为Pthread

线程的创建、终止pthread_createpthread_exit

等待所有线程运行完毕以便完成结果的合并pthread_join

Sinclude{pthread・h>

intpthread_create(

pthread_t*thread_handle,//idofthethread

constpthread_attr_t*attribute,

void*(*th:

r"

d_function)(void*),/*themainprogramcontent*/

void*arg):

/*thepointerforthecalculatedresult*/

intpthread_join(pthread_tthread,void**ptr)

intpthread_exit0

2)Beabletointroducethemethodsforsynchronization,e.g・implementingcriticalsectionandatomicoperations・Beabletowritethecorrespondingsentences

2)介绍同步的方法,例如:

实施的关键部分和原子操作。

能够写出相应的句子。

答:

3)BeabletowriteOpenMPprogramsformatrixmultiplication,ncomputationandsoon.

3)能编写OpenMP程序的矩阵乘法,h计算等。

4)BeabletocomparetheadvantageandshortcomingofThreadandOpenMPprogramming.

4)能够比较Thread和OpenMP编程的优点和缺点。

Chapter8第8章

1)Algorithmsformatrixtransposition

1)矩阵转宜算法

算法:

①按mesh连接进行块转垃(不同处理器间)

②进行块内转置(同一处理器内)

2)Algorithmsformatrixmultiplications

2)矩阵乘法算法

并发实现矩阵与向量的乘法。

Chapter9第9章

Befamiliarwithatleastonesortingnetworkaswellasaparallelsortingalgorithm.熟悉至少一个排序网络,以及一个并行排序算法。

奇-偶排序的并行算法

双调排序

Chapter10第10章

Algorithmsforshortestpaths,MinimumSpanningTree,ConnectedComponents,MaximalIndependentSet・最短路径,最小生成树,连接组件,极大独立集的算法。

3.Graphicaldescriptiononalgorithms3•对算法的图形描述

1)Mesh,hypercubeaswellasthenodenumbering

1)格网,超立方体以及节点编号

2)E-cuberoutingalgorithmonhypercube・

2)超立方体的立方体路由算法。

3)Qnetworkandbitonicsortingnetwork

3)Q网络和双调排序网络答:

4)Matrixmultiplicationalgorithm(atleastone)

4)矩阵乘法算法(至少1个)

5)Embeddingalineararrayintoahypercubeormesh,embeddingameshintoalineararray.

5)线性阵列嵌入到一个立方体或格网,线性阵列嵌入到一个格网。

6)Thebasiccommunicationoperations

a)Onetoallbroadcastandalltoonereduction

b)Alltoallbroadcastandreduction

c)Scatterandgather

6)基本通信业务

1)1对多广播和多对1规约2)多对多广播和规约3)分散和收集

4・Algorithms

Maximalindependentset,single(allpair)shortestpath,connectedcomponentsofgraphs.最大独立集,单一的(所有)的最短路径,图的连通分支。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 科学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1