home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.transputer
- Path: sparky!uunet!mcsun!sun4nl!dutrun!dutrun2!dutncp8!rob
- From: rob@pact.nl (Rob Kurver)
- Subject: Re: Manipulating process workspace on the Transputer
- Message-ID: <rob.721664219@dutncp8>
- Sender: news@dutrun2.tudelft.nl (UseNet News System)
- Nntp-Posting-Host: dutncp8.tn.tudelft.nl
- Organization: PACT, Delft, The Netherlands
- References: <6348@sersun1.essex.ac.uk>
- Date: Fri, 13 Nov 1992 14:16:59 GMT
- Lines: 49
-
- In <6348@sersun1.essex.ac.uk> aghao@sersun2.essex.ac.uk writes:
-
- >As part of my research, I need to be able to examine the workspace of one or
- >more Transputer processes. Clearly, this is quite feasible, as I can get hold
- >of the Wptr of a process.
-
- >However, as I need to access the workspaces as separate, individual entities,
- >I need to know what the boundaries are, ie where each particular process'
- >workspace starts and *ends*. One possibility is to find out what the size
- >of each workspace is, and that is what I am hoping to be able to do.
-
- It is not entirely clear to me what you're looking for, i.e. how you
- define the start and end of the workspace. Are you interested in the
- memory reserved for the entire stack of the current thread, or just in
- the frame used by the current function invocation?
-
- If the latter, you know the start by loading the Wptr (something
- like `__asm ("ldlp 0")'), and you'll have to know a bit about your
- compiler system to find out how to find the end. In general, this
- is were any arguments passed to this function are stored, so there
- may be some tricks to get this info. But again, this will most likely
- differ (if only slightly) between compilers. Please send me email
- if you'd be interested in the solution for our PACT Parallel C compiler.
-
- >Does anyone out there have any suggestions? Most of my work is done using
- >GENESYS C, although suggestions with ref. to any other language would be
- >gratefully received.
-
- If you're interested in finding out the start and end of the current
- stack for this thread, the solution will depend very much on your
- compiler or operating system, as the transputer process itself
- stores no such information. Most decent transputer compilers for
- modern languages like C do stack checking in order to allow for
- recursion, for which they need to pass some kind of thread
- descriptor to each function. This thread descriptor contains
- information about the start and end of the current stack, as well
- as info needed to get back to previous chunks of stack. This info
- is most likely given in your compiler documentation.
-
- > Obi Aghanya
-
- Rob Kurver
- PACT Parallel Architecture and Compiler Technology
-
- --
- PACT Rob Kurver
- Foulkeslaan 87 rob@pact.nl
- 2625 RB Delft ph: +31 15 616864
- The Netherlands fax: +31 15 610032
-