[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::axp-developer

Title:Alpha Developer Support
Notice:[email protected], 800-332-4786
Moderator:HYDRA::SYSTEM
Created:Mon Jun 06 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3722
Total number of notes:11359

3279.0. "Scandinavian Softline Technology" by HYDRA::VANORDEN () Thu Mar 06 1997 09:48

    Company Name :  Scandinavian Softline Technology
    Contact Name :  Hu Rui
    Phone        :  +358-9-5495 6202
    Fax          :  +358-9-512 4629
    Email        :  [email protected]
    Date/Time in :   6-MAR-1997 09:48:02
    Entered by   :  Donna Van Orden
    SPE center   :  MRO

    Category     :  UNIX
    OS Version   :  
    System H/W   :  


    Brief Description of Problem:
    -----------------------------
From:	SMTP%"[email protected]"  6-MAR-1997 05:20:34.94
To:	"[email protected]" <[email protected]>
CC:	
Subj:	Multi Threads Programming

Return-Path: [email protected]
Received: by vaxsim.mro.dec.com (UCX V4.1-12, OpenVMS V6.2 VAX);
	Thu, 6 Mar 1997 05:20:27 -0500
Received: from smtp.inet.fi by mail2.digital.com (5.65 EXP 4/12/95 for V3.2/1.0/WV)
	id AA02829; Thu, 6 Mar 1997 02:16:02 -0800
Received: from armi.softline.fi ([194.197.150.5]) by smtp.inet.fi with SMTP id <6334-24929>; Thu, 6 Mar 1997 11:38:02 +0200
Received: from localhost by armi.softline.fi; (5.65/1.1.8.2/29Apr96-0950AM)
	id AA10358; Thu, 6 Mar 1997 11:45:51 +0200
Date: 	Thu, 6 Mar 1997 11:45:50 +0200 (EET)
From: Hu Rui <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Multi Threads Programming
In-Reply-To: <[email protected]>
Message-Id: <[email protected]>
Organization: Scandinavian Softline Technology
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


I need some help in Multi Thread programming. I have your document about
the threads in the CD. But in the whole book there is only one example.

I need some more detailed example. And the skeleton for make thread in

work--boss modle
workgroup modle
pipeline modle
and mixed modle

It there are good teaching resouce available in the the Digital?

Regards.

_________________________________________________
Hu Rui
R&D, SMS Unit    (ASAP code A60205)
Scandinavian Softline Technology Oy
Tulkinkuja 3   02600 ESPOO   Finland
tel. +358-9-5495 6202  fax. +358-9-512 4629
home tel. +358-9-2789426
Internet: [email protected]  http://www.softline.fi/
_________________________________________________


T.RTitleUserPersonal
Name
DateLines
3279.1HYDRA::AXPDEVELOPERAlpha Developer supportThu Mar 06 1997 17:097
    
    Spetn about 1 hour looking for additional information, but came up
    empty.  Chuck offered to send him mail.
    
    Thanks Chuck.
    
    Donna VO
3279.2Reply sent to developerHYDRA::NEWMANChuck Newman, 508/467-5499 (DTN 297), MRO1-3/F26Fri Mar 07 1997 15:4638
Hu --

You asked for help examples of threads programming on Digital UNIX, mentioning
the following:

work--boss modle
workgroup modle
pipeline modle
and mixed modle

1)  The work--boss model is where a master thread hands out work to each of
        several slave threads.  If your application fits into the client/server
        model, this is for you.

2)  The workgroup model is where all the threads take a piece of the work.  When
        complete, they typically all meet again.  The main will return while
        the other threads wait for another task.

3)  The pipeline model is like an assembly line where one thread does some work,
        then passes it on to the next thread to process.

All my work (and the prime number example) fit the second model, but the same
functions are used by all the models.

One function that is not available is called a spin-lock.  This is similar in
functionality to a mutex, but very different in implementation.  Code to use a
spin-lock must be created via machine instructions.  They are more efficient
than a mutex when they are expected to turn around quickly, but should not be
used when the thread is expected to wait for a relatively long period of time
(e.g., a couple of seconds or more).

I don't know of any good books on thread programming, but there is documentation
on them which ships on CDs with the Operating Systems (you didn't mention if
you're using OpenVMS, Digital UNIX, or Windows NT).

I hope this helps.

								-- Chuck Newman
3279.3"Guide to DECthreads" - section 1.4 (both OS'es)...AMCUCS::SWIERKOWSKIQuot homines tot sententiaeFri Mar 07 1997 16:5615
Greetings!

  FWIW, both the OpenVMS and Digital UNIX documentation sets have a manual
titled: "Guide to DECthreads".  In both manuals, section 1.4 goes into detail
(with pictures) about the four software models for multi-threaded programmimg,
cheers...



						Tony Swierkowski
						Digital Equipment Corporation
						Software Partner Engineering
						Palo Alto, California
						(415) 617-3601
						"[email protected]"