Re: off topic: combined output of concurrent processes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/14/2012 11:20 PM, Amadeus W.M. wrote:
> For the sake of the argument, assume I echo 500 As, 500 Bs and 500 Cs. 
>
> I don't care which process the output is coming from. It doesn't matter 
> which order the As, Bs and Cs are output. All I care about is that I 
> don't get 349As followed by 245Bs, etc. I want to see blocks of 500 each. 
>
> I don't see how echoing into a pipe would change the problem. 
> Theoretically, if several processes (e.g. echo) are running in the 
> background, e.g. on a round robin basis, then potentially I could see 
> random sequences of As, Bs and Cs. It doesn't seem to be the case in 
> practice though. So which is it?
>
> This has to do with the operating system internals, it's not a trivial 
> question.

Why don't you test it and see that it does make a difference?

[egreshko@meimei test]$ ./io.sh > out

[egreshko@meimei test]$ grep ^A out | wc
     98      98     588

[egreshko@meimei test]$ mkfifo pipe
[egreshko@meimei test]$ ./io.sh > pipe

[egreshko@meimei test]$ cat pipe | grep ^A | wc
    100     100     600



-- 
Never be afraid to laugh at yourself, after all, you could be missing out on the joke
of the century. -- Dame Edna Everage
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux