PDA

Click to See Complete Forum and Search --> : change priority - two programs to access same array


Fons
May 14th, 2003, 05:17 AM
Hello All,

I need a way to create 2 applications that access the same memory array and some 5 -extra variables.
- A way for two programs to access same array
- A way to change priority of application

Why:
I'm currently trying to create a buffering system for our production machines.
The computer needs to send data from a file server to a special card that transfers this to the printing presses. The printing press only asks for data at the last minute and needs it very, very fast, and when there are performance problems with the system or the network it means allot of waste and costs.

Now I would like to create the program that reads from a memory buffer of 4M (I already have this) and a second application with Windows Priority set on low that constantly fills the buffer.

Even more interesting, the card that connects the printing press with the machine doesn't have an interrupt so the program is a infinite sickle constantly checking the card, so...
So I would create a change in process priority, when the card hasn't requested data for a while it should shift the priority of the buffering program up and the buffering program should increase the priority of the main program when the re buffering is complete.
So something like:
Main Program Buffering
When No request,
No Buffering High Low

Last request
> 10 seconds Med High
Rebuffing needed

Finished Buffering High Low

....

Thx for any info

fungi
May 14th, 2003, 12:26 PM
Sounds like classic producer/consumer processing. Look around for articles on using
semaphores or mutexes as sychronization methods.