Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] newbie threads question

Expand Messages
  • Santosh Sugur
    This is actually to see how our filesystem would respond to multiple thread access and it should behave like linux s fs, so I am checking my script on linux
    Message 1 of 7 , Nov 23, 2007
    View Source
    • 0 Attachment
      This is actually to see how our filesystem would respond to multiple
      thread access and it should behave like linux's fs, so I am checking
      my script on linux first. So its not that I want a task to be done but
      rather check how this would work.

      Regards,
      Santosh


      On Nov 23, 2007 9:22 PM, Randal L. Schwartz <merlyn@...> wrote:
      > Why Threads? Is this Windows? On Unix, it's better to fork.
      > --
      > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
      > <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
      > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
      > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
      >
    • merlyn@stonehenge.com
      ... Santosh This is actually to see how our filesystem would respond to multiple Santosh thread access and it should behave like linux s fs, so I am checking
      Message 2 of 7 , Nov 23, 2007
      View Source
      • 0 Attachment
        >>>>> "Santosh" == Santosh Sugur <santosh.sugur@...> writes:

        Santosh> This is actually to see how our filesystem would respond to multiple
        Santosh> thread access and it should behave like linux's fs, so I am checking
        Santosh> my script on linux first. So its not that I want a task to be done but
        Santosh> rather check how this would work.

        In general, "threads" in Perl cannot take advantage of multiple
        cores in modern multiprocessor systems, so the action on the filesystem
        won't be any different than a single "thread" would have generated.

        To give your filesystem a workout, fork. Only then can you get more activity.

        --
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
        <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
        Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
        See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
      • Santosh Sugur
        So we always use multiple processes as opposed to multiple threads while using perl on unix is it? That means threads in Perl is only for windows and is a
        Message 3 of 7 , Nov 23, 2007
        View Source
        • 0 Attachment
          So we always use multiple processes as opposed to multiple threads
          while using perl on unix is it? That means threads in Perl is only for
          windows and is a "dummy" thing for unix?

          Santosh

          On Nov 23, 2007 9:42 PM, Randal L. Schwartz <merlyn@...> wrote:
          > >>>>> "Santosh" == Santosh Sugur <santosh.sugur@...> writes:
          >
          > Santosh> This is actually to see how our filesystem would respond to multiple
          > Santosh> thread access and it should behave like linux's fs, so I am checking
          > Santosh> my script on linux first. So its not that I want a task to be done but
          > Santosh> rather check how this would work.
          >
          > In general, "threads" in Perl cannot take advantage of multiple
          > cores in modern multiprocessor systems, so the action on the filesystem
          > won't be any different than a single "thread" would have generated.
          >
          > To give your filesystem a workout, fork. Only then can you get more activity.
          >
          > --
          >
          > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
          > <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
          > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
          > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
          >
        • merlyn@stonehenge.com
          ... Santosh So we always use multiple processes as opposed to multiple threads Santosh while using perl on unix is it? That means threads in Perl is only for
          Message 4 of 7 , Nov 23, 2007
          View Source
          • 0 Attachment
            >>>>> "Santosh" == Santosh Sugur <santosh.sugur@...> writes:

            Santosh> So we always use multiple processes as opposed to multiple threads
            Santosh> while using perl on unix is it? That means threads in Perl is only for
            Santosh> windows and is a "dummy" thing for unix?

            It's mostly for compatability, yes. In fact, "fork" works on both,
            but uses threads in windows, and natural forking in Unix.

            --
            Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
            <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
            Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
            See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
          • Santosh Sugur
            Thanks. I shall check this code on windows (for educational reasons) and come back of I have problems. regards, Santosh
            Message 5 of 7 , Nov 23, 2007
            View Source
            • 0 Attachment
              Thanks. I shall check this code on windows (for educational reasons)
              and come back of I have problems.

              regards,
              Santosh

              On Nov 23, 2007 9:52 PM, Randal L. Schwartz <merlyn@...> wrote:
              > >>>>> "Santosh" == Santosh Sugur <santosh.sugur@...> writes:
              >
              > Santosh> So we always use multiple processes as opposed to multiple threads
              > Santosh> while using perl on unix is it? That means threads in Perl is only for
              > Santosh> windows and is a "dummy" thing for unix?
              >
              > It's mostly for compatability, yes. In fact, "fork" works on both,
              > but uses threads in windows, and natural forking in Unix.
              >
              > --
              >
              > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
              > <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
              > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
              > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.