c#中的流水线 - 解释 [英] Pipelining in c# - Explanation

查看:451
本文介绍了c#中的流水线 - 解释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨。我需要了解Pipelining及其优势,如果可能的话,还需要了解一下在c#中使用管道的一个简单的程序。我想用外行术语。不要用blahblah english.Please help me.Thanks提前。

Hi.I need to know about Pipelining and its advantages and also if possible a simple piece of program using pipelines in c#.I want in layman terms.Not in blahblah english.Please help me.Thanks in advance.

推荐答案

Hi
流水线操作将流程分解为大块任务,利用任务中的空白获得更多吞吐量。





< td>制作身体 < tr> < td> 
周否 原材料 添加引擎 添加绘画作品 添加室内装潢 成品车
1 - >          
2 - > - >        
3 - > - > - >    
4 - > - > - > - - >    
5 - > ; - > - > - > - >  
6 - > - > - > - > - > - >
7 - > - > - > - > - > - >






你看,建造第一辆车需要6周时间,但是第6周后,将有一辆新车通过门。这是Pipelining,你不要让资源等待而是让它继续工作。



同样的原则适用于计算,在计算中执行指令。 br />


你也可以在软件中使用相同的原理(使用线程,生产者,消费者问题等),特别是装配线自动化应用程序来控制扫描条码等产品,检查产品并申请到期日。因此,当应用程序检查第一个产品时,它还会扫描第二个产品的条形码。



我希望这会有所帮助。



问候

Jegan
Hi Pipelining is breaking down a process into chunk of tasks and utilize the gaps in the task get more throughput.


Week No Raw Material Make Body Add Engine Add Paint Work Add Upholstery Finished Car
1 -->          
2 --> -->        
3 --> --> -->      
4 --> --> --> -->    
5 --> --> --> --> -->  
6 --> --> --> --> --> -->
7 --> --> --> --> --> -->



you see, it took 6 weeks to build the first car, but after 6th week there will be a new car out through the door. This is Pipelining, you don''t let the resource waiting instead keep it working.

The same principle applies to computing, in terms of executing instructions in computing.

you can also use the same principle in software (using threads, Producer, consumer ques, etc) especially assembly line automation applications to control productions such as scan barcode, check product and apply expiry date. So by the time application checks the first product, it is also scan the barcode of the second item.

I hope this helps.

Regards
Jegan


这篇关于c#中的流水线 - 解释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆