Re: moving data from one place to another in a text file

From: Richard (riplin_at_Azonic.co.nz)
Date: 03/03/05

  • Next message: Rick Smith: "Re: moving data from one place to another in a text file"
    Date: 3 Mar 2005 00:43:04 -0800
    
    

    > One concern then would be the correct management and overhead of
    ensuring
    > each word is pulled only once from the queue.

    That is what locks are for. Only one thread can pull a word from the
    queue at a time.

    I did write a printer buffering system nearly 20 years ago which used
    multi-threading (actually it had to use full processes but running in
    the same code and data segments) because it had to monitor multiple
    i/o. It used a circular buffer and had to toggle locks to ensure the
    buffer was kept uncorrupted.

    > Now we're reaching a compromise where we could agree that
    > perhaps RW's thread solution is not so wrong.

    As is usual with RW he vastly overstates and hyperbolises. He states,
    for example, that multi-threading will save resources, but it does this
    only in the very narrow areas where many CPUs are available and
    otherwise unused. In fact as there will be many more cycles used up,
    not just by the extra code but also by the scheduler it will use _more_
    resources. 'Saving' resources when nothing else will use them is
    pointless. Wasting resources when other processes are trying to share
    them is also pointless.

    Most multi-CPU systems are servers and designated to run server
    software and multiple streams. Even desktops are not just running a
    single task, not since MS-DOS of 15 years ago. I have a Linux desktop
    for development and while I am typing here 'top' shows 160 tasks
    running, though the vast majority are sleeping.

    If you have multiple CPUs then run multiple streams. The OS will be
    processing the filesystem cache, the database will use multiple CPUs.
    The servers that I look after have multiple users and run several X
    desktops (to LTSP diskless graphic terminals) plus each user runs
    several copies of applications. Typically there are several hundred
    tasks.

    You may note that RW's machines are corporate servers (not desktops) on
    which he specifically closed down all other services to run his test.

    The idea that one program should grab every resource available should
    have died with MS-DOS.

    There _are_ good reasons for multi-threading, such as having many
    threads having to wait for different responses, and this may apply to
    database systems or web servers.

    RW has made many overstatements about where it can be used and when.

    > forces you to think about problems in a different manner.

    The hard bit is when RW has his steel trap mind closed around a subject
    getting him to think about it in a different manner.


  • Next message: Rick Smith: "Re: moving data from one place to another in a text file"

    Relevant Pages

    • multiple logins in 2000
      ... How do you prevent a user from logging onto multiple ... Running AD on 2K servers and 2KPro on desktops. ...
      (microsoft.public.win2000.security)
    • Re: X-no-archive, what is it good for?
      ... Besides, regular expressions would be the major reason why I would move to Agent but as I've been told (in their newsgroups) and read in their documentation it only has them in searches which can be saved but cannot be automatically triggered on header downloads. ... The workaround was to define multiple config files that would be specified on the command-line to load Agent, so you had multiple shortcuts to load multiple instances of Agent to concurrently access multiple accounts. ... Xnews was the only one that had decent support and implementation of regular expressions. ... Unfortunately I found out that many NNTP servers only proffer the overview headers and what I want to filter on are in the extended headers. ...
      (comp.security.firewalls)
    • panic: page fault - 6.0-RELEASE-p7
      ... While we thought we had done enough testing, apparently we hadn't and are now experiencing panic's on a number of the servers. ... ppc0: parallel port not found. ... unknown: can't assign resources (memory) ...
      (freebsd-questions)
    • Re: Hamiltons Rule In The Mirror
      ... > action of the actor. ... The variable +b is strictly the movement of resources ... from the actor to recipients such as food, ... i.e. only the entire multiple rb can ever ...
      (sci.bio.evolution)
    • Re: ISPs blocking SMTP connections from dynamic IP address space
      ... >resources. ... Their customers are supposed ... to send all outgoing mail out through their provider's mail servers. ... ``When dealing with any spammer, one must always keep in mind that you ...
      (freebsd-questions)