Results 1 to 2 of 2

Thread: change priority - two programs to access same array

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Posts
    7

    change priority - two programs to access same array

    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

  2. #2
    Hyperactive Member
    Join Date
    Jan 2003
    Location
    Cape Cod, US
    Posts
    292
    Sounds like classic producer/consumer processing. Look around for articles on using
    semaphores or mutexes as sychronization methods.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width