Most Complex Problem
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Most Complex Problem




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Most Complex Problem  
Omar Abid


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-12-07 06:19 PM

Hi folks,
It really don't interest me or i don't need a solution for this
problem but it always turn on my mind.
How can i with VB, C#, Java....  or any other languages create a 2 or
more simultaneous actions !
For example : Copying 2 file
1/Filecopy input output
2/Filecopy input output
Is there a solution to make those two command works simultaneously

Thanks for thinking
Omar Abid

(If you are interested on VB.net visit this group)
http://groups.google.com/group/VB2005?lnk=li






[ Post a follow-up to this message ]



    Re: Most Complex Problem  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-13-07 06:22 AM

In article <1184256668.403786.274620@k79g2000hse.googlegroups.com>,
Omar Abid <omar.abid2006@gmail.com> wrote:

> Hi folks,
> It really don't interest me or i don't need a solution for this
> problem but it always turn on my mind.
> How can i with VB, C#, Java....  or any other languages create a 2 or
> more simultaneous actions !
> For example : Copying 2 file
> 1/Filecopy input output
> 2/Filecopy input output
> Is there a solution to make those two command works simultaneously

Use multiple processes or threads.  Here's how to do it in shell:

cp input1 output1 & cp input2 output2

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***





[ Post a follow-up to this message ]



    Re: Most Complex Problem  
Fred Kleinschmidt


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-13-07 06:22 PM


"Barry Margolin" <barmar@alum.mit.edu> wrote in message
news:barmar-D07D4D.21480712072007@comcast.dca.giganews.com...
> In article <1184256668.403786.274620@k79g2000hse.googlegroups.com>,
> Omar Abid <omar.abid2006@gmail.com> wrote:
> 
>
> Use multiple processes or threads.  Here's how to do it in shell:
>
> cp input1 output1 & cp input2 output2
>

The above doesn't really do the two simultaneously. The two processes
may appear to be working at the same time, but in reality one process
gets some time, then it is rolled out and the other process gets some time,
then that one rolls out and the first task resumes, etc.

The only way to do it truly simultaneously is if you have two separate
processors.
--
Fred L. Kleinschmidt
Boeing Associate Technical Fellow
Aero Stability and Controls Computing







[ Post a follow-up to this message ]



    Re: Most Complex Problem  
Logan Shaw


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-14-07 06:26 AM

Fred Kleinschmidt wrote:
> The only way to do it truly simultaneously is if you have two separate
> processors.

Or I/O that uses DMA.  Then the processor only needs to start transfers,
not copy every byte.

- Logan





[ Post a follow-up to this message ]



    Re: Most Complex Problem  
Pascal Bourguignon


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-14-07 06:26 AM

"Fred Kleinschmidt" <fred.l.kleinmschmidt@boeing.com> writes:

> "Barry Margolin" <barmar@alum.mit.edu> wrote in message
> news:barmar-D07D4D.21480712072007@comcast.dca.giganews.com... 
>
> The above doesn't really do the two simultaneously. The two processes
> may appear to be working at the same time, but in reality one process
> gets some time, then it is rolled out and the other process gets some time
,
> then that one rolls out and the first task resumes, etc.
>
> The only way to do it truly simultaneously is if you have two separate
> processors.

Who said there was only one processor, or only one disk, or only one channel
?

--
__Pascal Bourguignon__                     http://www.informatimago.com/

NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.





[ Post a follow-up to this message ]



    Re: Most Complex Problem  
David Schwartz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-16-07 06:20 PM

On Jul 13, 7:40 am, "Fred Kleinschmidt"
<fred.l.kleinmschm...@boeing.com> wrote:

> The above doesn't really do the two simultaneously. The two processes
> may appear to be working at the same time, but in reality one process
> gets some time, then it is rolled out and the other process gets some time
,
> then that one rolls out and the first task resumes, etc.

That's a misleading statement for a variety of reasons. The primary
one is to assume that a process is only accomplishing useful work when
that process is running. For example, when a process goes to write
some bytes to a file, they are likely only copied into memory. The
system continues to do useful work on behalf of that process even
while another process has been switched to.

> The only way to do it truly simultaneously is if you have two separate
> processors.

Untrue. A modern computer system contains numerous agents that are in
fact capable of operating concurrently. For example, disk can read
data into its local cache while the CPU is doing something else. In
may cases, the disk can even transfer data out of main memory using
DMA while the CPU is doing something completely different.

DS






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:54 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register