|
Posted by Jerry Stuckle on 01/08/08 17:59
Betikci Boris wrote:
> On Jan 7, 10:36 am, Hanoi <hin...@inwind.it> wrote:
>> Hi,
>>
>> I would like to have a php file that log informations sent by an image
>> request.
>>
>> For logging, I use fwrite to write on a file.
>>
>> If more requests are done on the same time, there could be a lost of
>> data because the file is open by one process and not available for the
>> other processes?
>>
>> Thanks
>
> If you use OS as gnu/linux, cpu will handle each process sequently.
>
Incorrect. Processes are run concurrently, not sequentially. Any
interrupt (i.e. disk i/o, timer, network traffic) will cause the OS to
switch back to the system to handle the interrupt. When processing
resumes, it will be the next process in the list. That is not
necessarily the same process which was executing before the interrupt.
That's why things like mutex semaphores and file locks exist.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|