Programs conflict when they both attempt to use the same resource. When multiple programs attempt to operate on a resource at the same time, there is a risk of Concurrency Problems. Concurrency problems occur when one process performs a change on the resource, and the other program (which was in the middle its own modification to the resource) is unaware of it, and thus unable to accommodate.
Here are a few examples of text book concurrency issues.
Last-in-Wins Problem
Imagine you are using an FTP directory to share a document where you and a colleague are collaborating on a document. you download the document, edit it, and post it again, as does your colleague.
- You download the document, and start a set of changes that takes 1 hour.
- Your colleague downloads the document at the same time you did, but only takes half an hour to complete and reupload their changes.
Result: when you upload your document, you overwrite their changes and they are lost.
Stale Data
In the same scenario, your colleague makes some changes that you need, without telling you. your copy of the file doesn't have the changes,
Result: You write the same changes in slightly different words yourself, or worse, fire off a nasty email about how its missing.
This seems like a simple scenario, but in advanced cases like multi-access databases if you select records at the same millisecond someone is updating them, you can experience serious issues.
Bad computation
A married couple have a shared bank account and ATM cards. They have 1000USD in their account. In their daily life, they are on opposite sides of town, and both access the ATM at the same instant. They both withdraw 1000USD. The ATMs both know that the balance is 1000, so they allow the withdrawl, and then write back to the central database that the new balance is 0.
Result: the bank is now out 1000USD, and doesn't even know it.
In all these examples there were multiple parties that were performing actions on a shared resource at or at about the same time. Hence the terms "concurrency" or "Synchronicity".
Solutions
There are a few ways to deal with these kinds of issues. One is to use software that arbitrates between the multiple parties accessing the resource. These arbiter programs have two options, depending on the scope and predictability of the operations:
- Merge the operations intelligently
- Block/lock one of the two operations until the first that is noticed is complete.
It is also possible to block/lock, provided that both programs are designed to check a shared flag indicating the state of the resource. this generally requires custom development.
Your Answer
In your specific case, The resources are the files on your disk.
The Synchronicity comes from events like file Read/Write, which trigger on-access scans in both AV programs.
Windows acts as an arbiter to resolve filesystem concurrency issues by locking files when programs open them for specific operations.
This means that both programs are racing to access the file, and whoever gets there first gets the lock. At a low level, this results in some disk thrashing as both programs begin their own I/O activities, forcing the hardware to do both tasks separately, yet interleaving the IO instructions, making both much less efficient, and in the end, only one of them will win. the other will spin and wait to be able to establish their own lock.