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

Re: [PBML] newbie threads question

Expand Messages
  • 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 1 of 7 , Nov 23, 2007
    • 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 2 of 7 , Nov 23, 2007
      • 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 3 of 7 , Nov 23, 2007
        • 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 4 of 7 , Nov 23, 2007
          • 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.