How difficult would it be to allow several instances of cgminer in the same system?
Why would I want to do that? I am building a "Condo" system where miners are hosted in a remote location. I want to give each user full control of his mining unit, which may be only part of a boxed system. For example, an Avalon box can have as many as 4 hardware modules, and each module can have 8 hashing units. A user in the condo system can own as small as a single hashing unit, and I want her to be able to launch her own instance of cgminer on the same box where other users are running their own instance of cgminer. Each cgminer instance is associated with a user ID, and that user ID is in turn associated with particular hashing unit(s). The association of a user ID to hashing unit(s) is done by another subsystem, so all that really needs to happen is to allow cgminer to accept a command-line parameter that indicates which hashing unit(s) it will use exclusively.
Each cgminer instance should be separately addressable in the RPC protocol/API.
I believe this requires substantial code changes (may be changes to both cgminer itself and the Avalon drivers), so I will give a hashing unit in the condo I am building to whoever can get this done, and yes, it's OK for it to be open source.
Edit: Please PM me if you would be interested in implementing this project.
THis shouldn't require any code change at all. I routinely run multiple instances of cgminer on my mining rigs. One for GPUs, one for BFL FPGA devices, one for BFL SC devices, etc. Each has an independent API endpoint. You just have to start each version with command line parameters to make sure that it selects the correct devices (see the --usb parameter and the discussion of it in the READMEs) so that no two cgminer instances try to mine against the same devices. You also want to specify a different API port for each instance.