A
A
alex_ak12016-03-31 12:46:38
System Programming
alex_ak1, 2016-03-31 12:46:38

How to build a thread pool based on a Petri net?

Hello. They gave me the task to write a multitasking lab.
The fourth part in it is to model the pool of threads using a Petri net. How should it be done?
I understood how the Petri net works for the critical section and the semaphore, but I don’t understand what is needed from me in this part. So far, I've thought of the following options:
1. producer-consumer - several chains consume (slowly process), one quickly produces. The number of consumers is limited (N).
2. Semaphore, in which the second part of the network in each chain has its own. That is, the token does not go to node 2, but to node 2 + chain_number. Although I don’t understand how this differs from a simple semaphore, the teacher said that in the thread pool, each thread has its own execution path.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question