知名公司技术总监最后的一道关键面试题,英文的,求个答案和分析,只有1道。最好能适当翻译下英语
A piece of DSP program want to do the following tasks
1)Use funcA() to process 1M bytes dataA and generate 2M bytes data B
2)Use funcB() to process 1M bytes dataA and generate 3M bytes data C
3)Move the data B generated in 1) external memory
Assume that Task1 needs 50ns and Task2 needs 60ns. QDMA is used in Task3
and the time needed for QDMA configuation and startup is 0.1ns.Data moving
for 2M bytes needs 40ns.
In order to finish the above tasks, whats the minimum time needed for this DSP program____.
[解决办法]
1.
1任务、2任务、3任务串行处理,则需要50+60+0.1+40=150.1ns
2.
1任务和2任务并行处理
1任务和3任务串行处理,
则完成所有任务需要max(50+0.1+40, 60)=90.1ns。
3.
1任务、2任务、3任务并行处理,则需要max{50, 0.1+40, 60} = 60ns