Image Threads Investigation Report

specially formed committee. Second, the committee went through the lists from all the SIGs
and picked 20 to 30 enhancements and created a final ballot. After all the users of HP e3000
community have voted, CSY will quickly review the result and choose several items from the
top ten and then begin working. The item, which got the most votes, was "make TurboIMAGE
thread aware and thread safe".
1.2 Requests
The details of the item, "make TurboIMAGE thread aware and thread safe", actually contain
many aspects. This item is combined of a couple of enhancement requests from the
SIGIMAGE enhancement list. One request is "make TurboIMAGE thread aware and thread
safe"; the other request is "allow a process to pass a DBOPEN to a son process if the
database is in stable status". There is one more aspect of this item, which is "pass base ID
between processes". People hope one solution can solve as many issues as possible. Even
though these components have the same concept, which is trying to share DBOPEN between
processes, solutions to these components are quite different. From the view of the dispatcher
of a system, thread, son process, forked process and normal process are the same, i.e. these
are all processes and have unique process numbers (PIN). However, threads, forked
processes, son processes and normal processes are different in many ways. The major
difference is thread shares the SR5 space with the initial thread which creates it, but the
forked process has its own SR5 space; the forked process inherits opened files from its parent
process but a son process created by createprocess does
not. Because of these differences,
leveraging the code from one component to another may be minimal.
This document lists issues for each component and the possible solutions. Based on the
resources availability and the customersneed, we may choose to implement whole or just a
portion of this item.
1.3 Acknowledgements
I would like to thank the following people for sharing their MPE, thread knowledge with me:
Bill Cadier - for his clear and detailed paper, Pthreads for the HP e3000
Craig Fairchild - for the internal of the file system he exposed to me
Marcia McConnell - for her insight on the thread implementation in MPE/iX
2.
Problem statement
2.1 Thread safe
In the traditional MPE environment, every execution of a piece of code is called a process.
The definition of a process is "the unique execution of a particular program at a particular
time". A unique number (PIN) is assigned to a process, coupled with a stack, heap space and
many data structures in the system to form an executable identity. Since MPE moved toward
open systems, many features have being added to MPE; POSIX Thread is one of these.
Thread is somewhat like a process, but uses less resource and needs
less work to create and
destroy. A thread has its own PIN and has its own data structures such as PIB, PIBX, PCB
and PCBX. A thread has its own stack but shares the same SR5 virtual space with the initial
thread, which creates it. A thread also shares the open files with its initial thread. Because of
these special characteristics, TurboIMAGE database access can not be handled correctly in
the thread environment. The reason why TurboIMAGE is not safe in thread environment can
be divided into the following:
Page
2
of
9
Image Threads Investigation Report
7/18/2008
http://www.hp.com/cgi
-
bin/pf
-
-
threa
...