海子是什么意思| 经期同房需要注意什么| 1987年出生属什么| 海绵体修复吃什么药| 11月2日什么星座| 绣球花什么时候修剪| 食管炎是什么原因引起的| 什么是僵尸恒星| 晕血是什么原因| 嘴巴长溃疡是什么原因| 一个月一个太念什么| 脚趾头抽筋是什么原因| 翡翠都有什么颜色| 肾功能不好有什么症状| 连长相当于地方什么官| 猴子偷桃是什么意思| 孔雀开屏什么意思| 浸润性癌是什么意思| 老是做噩梦是什么原因| 玛咖是什么| hh是什么品牌| 田此读什么| esse是什么牌子的烟| 眼底筛查是检查什么| 什么果| 磨砂膏是什么| 敢爱敢恨是什么意思| 什么蘑菇有毒| kid是什么意思| 破处是什么意思| 为什么会得阴虱| 上吐下泻吃什么| 养儿防老下一句是什么| 生理盐水有什么用| 左室高电压是什么意思| 国师代表什么生肖| 南岳什么山| dei是什么意思| 霉菌性阴道炎有什么症状| 张家界为什么叫张家界| 71年出生属什么生肖| 什么时候喝蜂蜜水最好| 什么眼霜比较好用| 最坚固的锁怕什么| 法不传六耳什么意思| 驴打滚是什么意思| 阳光明媚是什么意思| hiv1是什么意思| 口水为什么是臭的| 什么药补肾| 鸡吃什么食物| 马中赤兔人中吕布什么意思| 邂逅什么意思| 气质是什么| 梦见扫墓是什么预兆| 梅毒是什么| 无情是什么意思| 盛产是什么意思| 堃什么意思| 眼球出血是什么原因引起的| 孕妇什么体质容易晚生| 什么座| 大熊猫属于什么科| 古驰是什么牌子| 不二人选是什么意思| 西红柿和什么不能一起吃| 黄疸是什么引起的| 超体2什么时候上映| 林黛玉和贾宝玉是什么关系| 玙字五行属什么| 利益最大化是什么意思| 住院医师是什么级别| 腰肌劳损是什么症状| 职业资格证书有什么用| 肺纤维灶是什么意思| 舌苔发青是什么原因| 荨麻疹看什么科| 黄色有什么黄| 财不外露什么意思| 豆角没熟中毒什么症状| 周传雄得了什么病| 巾失念什么| 大祭司是什么意思| 长沙有什么学校| 鳜鱼是什么鱼| 绍兴本地人喝什么黄酒| 大腿肌肉酸痛是什么病| 合约机什么意思| 减肥为什么不让吃南瓜| 口唇疱疹用什么药膏| 什么的劝告| 发低烧有什么症状| 川芎有什么功效| 异想天开是什么意思| 玉米淀粉是什么| 占有欲强是什么意思| 舌苔发白是什么原因引起的| 石英表不走了是什么原因| 体检需要带什么| 偏头痛不能吃什么食物| 端午节有什么习俗| 羊蛋是什么部位| 做梦相亲是什么意思| 脱盐乳清粉是什么| 套牌是什么意思| 中介什么意思| 身体缺钾会有什么症状| 植物神经功能紊乱吃什么药最好| 火险痣是什么意思| 宦官是什么意思| 心室预激是什么意思| 老鹰的天敌是什么| 扁桃体肿大有什么症状| 胆囊毛糙是什么意思| 天降横财什么意思| 八仙过海是什么意思| n是什么牌子的鞋| 乳腺点状钙化是什么意思| 崩大碗配什么煲汤最好| 什么是血管瘤| 过誉是什么意思| 杏仁和什么不能一起吃| 女性睾酮高意味着什么| 三尖瓣少量反流是什么意思| 脾胃不好吃什么药好| 1975年是什么命| 什么屎不臭| 大爷是什么意思| 向日葵是什么季节| 微创是什么| 人的肝脏在什么位置| 3月20号是什么星座| 竖中指代表什么意思| 什么是转基因食品| 乘风破浪是什么生肖| cdg是什么牌子| t恤搭配什么裤子好看| 拉泡沫稀便什么原因| 外阴炎吃什么药| 女性私处长什么样| 白芽奇兰是什么茶| 南极和北极有什么区别| 中校相当于政府什么官| 流鼻血是什么病的前兆| 荀彧字什么| 久坐睾丸疼是什么原因| 粒细胞偏高是什么意思| peek是什么材料| 去肝火喝什么茶好| 黄明胶是什么| 玄学是什么| 女人出汗多是什么原因| 右胸是什么器官| 黄鼠狼喜欢吃什么东西| 色盲色弱是什么意思| 牙齿吃甜的就会疼什么原因| 时柱将星是什么意思| 什么植物吸收甲醛| TOYOTA是什么车| 声带息肉有什么危害| 漠漠什么意思| 猫咪都需要打什么疫苗| 偶像包袱是什么意思| 已是什么意思| 胃在什么地方| 喉咙疼吃什么药| 结婚 为什么| 宗室是什么意思| 阚姓念什么| 97年属什么生肖| 什么的杜鹃花| 脸色发红什么原因| 小猫咪能吃什么| 血红蛋白是指什么| itp是什么意思| 什么事情只能用一只手去做| 行云流水是什么意思| 小孩子睡觉磨牙是什么原因| 头晕吃什么| 肾阴虚的表现是什么| 柿子和什么不能一起吃| 七月11日是什么星座| 荨麻疹吃什么食物好| 清炖排骨汤放什么调料| 尿血挂什么科| 花椒吃多了对身体有什么影响| 倒钩是什么意思| 离岸人民币是什么意思| 乙基麦芽酚是什么东西| 接龙是什么意思| 92年的属什么生肖| 七嘴八舌是什么生肖| 大肠炒什么菜好吃| 鱼油有什么用| 牙齿冷热都疼是什么原因| 乌冬面是什么做的| 窍是什么意思| pangchi是什么牌子的手表| 肾结石是什么原因| 府绸是什么面料| 拉肚子吃什么药最好| 洋葱什么时候种| 抑制是什么意思| 拉拉裤后面的胶片是做什么用的| 腋下皮肤发黑是什么原因引起的| 眼花是什么原因引起的| 胃反流吃什么药效果好| 白酒泡什么补肾壮阳最好| 偶尔头疼是什么原因| 口苦口臭口干吃什么药| 一带一路是指什么| 什么叫增值税| 三百年前是什么朝代| 鸡汤放什么调料| 锥切手术是什么意思| 喜怒无常是什么意思| 荔枝有什么作用与功效| 1969年属什么生肖| 眼睛有异物感是什么原因| 浑水摸鱼什么意思| 爬楼是什么意思| 什么食物可以减肥| 6.5是什么星座| 兔子跟什么生肖最配对| 胸为什么一大一小| 相敬如宾是什么意思| 断崖式是什么意思| 眉毛上长痣代表什么| gp是什么的缩写| 喝菊花茶有什么好处| 奇异果和猕猴桃有什么区别| 扁桃体发炎吃什么药效果好| 肝有钙化灶是什么意思| 做什么业务员好| 为什么相爱的人却不能在一起| 喝什么去火| 成吉思汗属什么生肖| 五脏六腑指什么| 什么牌子的助听器最好| 女性支原体感染有什么症状| 姜枣茶什么季节喝最好| 梦见墙倒了有什么预兆| 什么样的春光| 着床成功后有什么症状或感觉| 白发多吃什么可以改善| 侬是什么意思| 胃疼喝什么能缓解疼痛| 指鼻试验阳性代表什么| 地中海贫血携带者是什么意思| 省油的灯是什么意思| 为什么胃酸会分泌过多| 甲亢病有什么症状| 喝水多尿多是什么原因| 嘴巴臭是什么原因| 反流性食管炎吃什么中药| 炼乳是什么东西| 不想长胡子有什么办法| 青岛是鲁什么| 女中指戴戒指什么意思| 阿玛尼手表算什么档次| 脐下三寸是什么地方| KT是什么| 杭州市市长什么级别| 歆字五行属什么| 百度

二师铁门关市“互联网+双创”点燃青年创业激情

(Redirected from Pipes and filters)
百度 廊坊的新机遇大兴区机场办副主任赵建国在今年初召开的大兴区两会上曾介绍,北京新机场临空经济区总面积约150平方公里,其中北京部分约50平方公里,河北省部分约100平方公里。

In software engineering, a pipeline consists of a chain of processing elements (processes, threads, coroutines, functions, etc.), arranged so that the output of each element is the input of the next. The concept is analogous to a physical pipeline. Usually some amount of buffering is provided between consecutive elements. The information that flows in these pipelines is often a stream of records, bytes, or bits, and the elements of a pipeline may be called filters. This is also called the pipe(s) and filters design pattern which is monolithic. Its advantages are simplicity and low cost while its disadvantages are lack of elasticity, fault tolerance and scalability.[1] Connecting elements into a pipeline is analogous to function composition.

Narrowly speaking, a pipeline is linear and one-directional, though sometimes the term is applied to more general flows. For example, a primarily one-directional pipeline may have some communication in the other direction, known as a return channel or backchannel, as in the lexer hack, or a pipeline may be fully bi-directional. Flows with one-directional trees and directed acyclic graph topologies behave similarly to linear pipelines. The lack of cycles in such flows makes them simple, and thus they may be loosely referred to as "pipelines".

Implementation

edit

Pipelines are often implemented in a multitasking OS, by launching all elements at the same time as processes, and automatically servicing the data read requests by each process with the data written by the upstream process. This can be called a multiprocessed pipeline. In this way, the scheduler will naturally switch the CPU among the processes so as to minimize its idle time. In other common models, elements are implemented as lightweight threads or as coroutines to reduce the OS overhead often involved with processes. Depending on the OS, threads may be scheduled directly by the OS or by a thread manager. Coroutines are always scheduled by a coroutine manager of some form.

Read and write requests are usually blocking operations. This means that the execution of the source process, upon writing, is suspended until all data can be written to the destination process. Likewise, the execution of the destination process, upon reading, is suspended until at least some of the requested data can be obtained from the source process. This cannot lead to a deadlock, where both processes would wait indefinitely for each other to respond, since at least one of the processes will soon have its request serviced by the operating system, and continue to run.

For performance, most operating systems implementing pipes use pipe buffers, which allow the source process to provide more data than the destination process is currently able or willing to receive. Under most Unixes and Unix-like operating systems, a special command is also available, typically called "buffer", that implements a pipe buffer of potentially much larger and configurable size. This command can be useful if the destination process is significantly slower than the source process, but it is desired that the source process complete its task as soon as possible. E.g., if the source process consists of a command which reads an audio track from a CD and the destination process consists of a command which compresses the waveform audio data to a format like MP3. In this case, buffering the entire track in a pipe buffer would allow the CD drive to spin down more quickly, and enable the user to remove the CD from the drive before the encoding process has finished.

Such a buffer command can be implemented using system calls for reading and writing data. Wasteful busy waiting can be avoided by using facilities such as poll or select or multithreading.

Some notable examples of pipeline software systems include:

  • RaftLib – C/C++ Apache 2.0 License

VM/CMS and z/OS

edit

CMS Pipelines is a port of the pipeline idea to VM/CMS and z/OS systems. It supports much more complex pipeline structures than Unix shells, with steps taking multiple input streams and producing multiple output streams. (Such functionality is supported by the Unix kernel, but few programs use it as it makes for complicated syntax and blocking modes, although some shells do support it via arbitrary file descriptor assignment).

Traditional application programs on IBM mainframe operating systems have no standard input and output streams to allow redirection or piping. Instead of spawning processes with external programs, CMS Pipelines features a lightweight dispatcher to concurrently execute instances of more than 200 built-in programs that implement typical UNIX utilities and interface to devices and operating system services. In addition to the built-in programs, CMS Pipelines defines a framework to allow user-written REXX programs with input and output streams that can be used in the pipeline.

Data on IBM mainframes typically resides in a record-oriented filesystem and connected I/O devices operate in record mode rather than stream mode. As a consequence, data in CMS Pipelines is handled in record mode. For text files, a record holds one line of text. In general, CMS Pipelines does not buffer the data but passes records of data in a lock-step fashion from one program to the next. This ensures a deterministic flow of data through a network of interconnected pipelines.

Object pipelines

edit

Beside byte stream-based pipelines, there are also object pipelines. In an object pipeline, processing elements output objects instead of text. PowerShell includes an internal object pipeline that transfers .NET objects between functions within the PowerShell runtime. Channels, found in the Limbo programming language, are other examples of this metaphor.

Pipelines in GUIs

edit

Graphical environments such as RISC OS and ROX Desktop also use pipelines. Rather than providing a save dialog box containing a file manager to let the user specify where a program should write data, RISC OS and ROX provide a save dialog box containing an icon (and a field to specify the name). The destination is specified by dragging and dropping the icon. The user can drop the icon anywhere an already-saved file could be dropped, including onto icons of other programs. If the icon is dropped onto a program's icon, it is loaded and the contents that would otherwise have been saved are passed in on the new program's standard input stream.

For instance, a user browsing the world-wide web might come across a .gz compressed image which they want to edit and re-upload. Using GUI pipelines, they could drag the link to their de-archiving program, drag the icon representing the extracted contents to their image editor, edit it, open the save as dialog, and drag its icon to their uploading software.

Conceptually, this method could be used with a conventional save dialog box, but this would require the user's programs to have an obvious and easily accessible location in the filesystem. As this is often not the case, GUI pipelines are rare.

Other considerations

edit

The name "pipeline" comes from a rough analogy with physical plumbing in that a pipeline usually[2] allows information to flow in only one direction, like water often flows in a pipe.

Pipes and filters can be viewed as a form of functional programming, using byte streams as data objects. More specifically, they can be seen as a particular form of monad for I/O.[3]

The concept of pipeline is also central to the Cocoon web development framework or to any XProc (the W3C Standards) implementations, where it allows a source stream to be modified before eventual display.

This pattern encourages the use of text streams as the input and output of programs. This reliance on text has to be accounted when creating graphic shells to text programs.

See also

edit

Notes

edit
  1. ^ Fundamentals of Software Architecture: An Engineering Approach. O'Reilly Media. 2020. ISBN?978-1492043454.
  2. ^ There are exceptions, such as "broken pipe" signals.
  3. ^ "Monadic I/O and UNIX shell programming" Archived 2025-08-14 at the Wayback Machine.
edit
o型血为什么招蚊子 体脂率是什么 马甲线是什么意思 元胡是什么 孤军奋战是什么意思
ctc什么意思 porsche是什么牌子的车 乳腺ca是什么意思 乳房头疼是什么原因 什么是抹茶
心境情感障碍是什么病 西双版纳有什么好玩的 什么食物胆固醇含量高 黑眼圈是什么原因造成的 身上起红点是什么病
尿路感染吃什么中药 布鲁斯是什么意思 四季更迭是什么意思 9.1号是什么星座 起床气是什么意思
血糖高能喝什么饮料hcv8jop4ns1r.cn 吃茄子有什么坏处hcv9jop4ns7r.cn 贝壳是什么垃圾hcv9jop0ns5r.cn 抗炎和消炎有什么区别helloaicloud.com 看好你是什么意思hcv7jop7ns3r.cn
置换是什么意思hcv7jop5ns1r.cn 头皮痒头皮屑多是什么原因xianpinbao.com 什么叫邪淫hcv9jop7ns9r.cn 渐冻症是什么病hcv8jop6ns3r.cn 黄皮果什么时候成熟1949doufunao.com
姑息性化疗什么意思hcv7jop5ns6r.cn 脚掌发红是什么原因hcv8jop2ns1r.cn 霸天虎和威震天是什么关系hcv8jop3ns2r.cn 山东古代叫什么hcv9jop0ns1r.cn 歼31为什么没消息了hcv7jop5ns2r.cn
什么是英语自然拼读hcv8jop3ns8r.cn 10月30日什么星座hcv8jop2ns5r.cn 手背肿胀是什么原因hcv7jop6ns1r.cn 餐饮sop是什么意思hcv9jop4ns1r.cn 什么的身子hcv8jop6ns0r.cn
百度