Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Theory Question
Message
De
21/06/2000 11:39:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00348069
Message ID:
00382718
Vues:
29
Steve,

Hmm..

As I understand it these are not what most folks think of when they think of "multi-threaded". FoxPro uses the Apartment Thread model, not 'true' multi-threading. If there is any allocation of a particular thread to a particular processor it would be managed by MTS though.

Here's the bottom line though. If you have a single COM object (COM, DCOM, COM+) that is registered on a particular MTS 'box' here's basically what happens:

1. MTS receives a request for COM Object 'X'.
2. MTS looks to see if there is an instance of Object 'X' already instantiated.
3. If no it instantiates one and runs.
4. If there is MTS then looks to see if the object is in use.
5. If it is go to Step #3.
6. If not use it.
7. When the object is 'finished' doing whatever it's supposed to do it then goes into a waiting period. (see step #2)
8. After a preset amount of time (MTS Administrator controlled) the object is released from memory.

The whole idea here is that MTS essentially manages the object for you. In the case of FoxPro's objects being 'Apartment Model' object this means that instead of all requests using a single object in a multi-threaded sense MTS loads 'n' number of objects as needed. Each process gets its own object but that object can be used by multiple requestors, though only one at a time.

I'm somewhat new to the minutae of COM myself so any errors are mine alone. <g>

Again, as far as what CPU runs what object I think that's an issue with MTS but to be honest with you I'm not quite sure why you think this could be an issue? Are you planning on some serious COM/MTS slamming? <g> Sounds like you are. If so I'd naturally recommend that you get a dedicated box for MTS if you haven't already. Also, I'd want to suggest that if you plan on having a LOT of instances running that the big issue will be memory.

Does this help?

Best,

DD




>So the multi-threaded DCOM DLL running inside MTS will spread the threads across both CPUs but if I have 6 copies of the .exe running instead, they will only run on CPU0?
>
>
>
>>FoxPro itself won't benefit directly from a multi-processor machine as it cannot internally take advantage of the two processors. However, if I'm understanding you and you are running SQL (7.0?) then you most definitely will gain an advantage as it IS able to take advantage of multiple processors.
>>
>>Your OS also can benefit, particularly W2K.
>
>
>
>>>OK, so now I am down to one DCOM .exe (no MTS) on my IIS box and VFP .exe's on client workstations (98/NT). Does a VFP COM .exe benefit from running on a dual-processor box, or do I have to compile it as a .DLL and shove that into MTS?
>>>
>>>I have a dual-PII-266 and a single-PII-400 so I'm wondering...
>>>
Best,


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform