FW: [Aimmath-developers] data conflict?
Brought to you by:
gustav_delius,
npstrick
From: Greg G. <gr...@ma...> - 2003-07-18 05:11:49
|
On Wednesday, 16 July 2003 4:17 PM, Gustav wrote: > Here is a question that shows that I don't quite understand how AiM > works: > AiM runs several Maple processes in parallel, each one of them > reads from and writes to the same student and quiz data files. > So why is there never a conflict? As I understand the algorithm, AIM has up to 8 Maple (mserver) processes, each servicing only one student at a time. Any individual student is only (under normal circumstances) assigned to one process. If a student has only just logged on (and isn't already logged on), their request is passed to the next available process; otherwise their request is serviced by the process that was last assigned to them and if that's busy then I think they get an `AIM is busy' message. I said `under normal circumstances'. Sometimes a process becomes unresponsive because a student's request has caused Maple to attempt to do something that's intractable. It seems that under these circumstances a student can be assigned a new process, and if they send the same thing they `burn' another process. This is how a couple of server crashes/freezes occurred last semester (one student sends the same intractable request 8 times - the other 7 times happen because the student is thinking `Why isn't AIM responding?' and sends it again, hoping AIM will wake up). It's not clear to me what exactly happens here. Is it possible for a very long request to finally succeed and write something to a student's data directory at exactly the same time as another write? I don't think this is possible, because I believe the java process running the show puts a lock on the file before it writes and another process must wait for the lock to be taken off. That's my meagre understanding ... possibly Ken if he's listening in could explain it better. Regards, Greg |