Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 maintenancemutex | |
|
iannucci
2017/07/10 19:40:23
rename the folder to 'mmutex' and have the README
charliea (OOO until 10-5)
2017/07/10 19:56:50
Done.
| |
| 2 ================ | |
| 3 | |
| 4 maintenancemutex is a command line tool that helps prevent maintenance tasks | |
| 5 from running during performance sensitive tasks. | |
|
iannucci
2017/07/10 19:40:23
s/performance sensitive/user everywhere
charliea (OOO until 10-5)
2017/07/10 19:56:50
Done.
| |
| 6 | |
| 7 The command line tool uses a global lock file to prevent performance sensitive | |
| 8 tasks from being run while potentially expensive system maintenance tasks are | |
|
iannucci
2017/07/10 19:40:22
s/potentially expensive//
The point of the tool i
charliea (OOO until 10-5)
2017/07/10 19:56:50
Done.
| |
| 9 also being run. | |
| 10 | |
| 11 Clients can use this tool to request that their task be scheduled with one of | |
|
iannucci
2017/07/10 19:40:23
s/scheduled/run
There's no 'deferral' happening i
charliea (OOO until 10-5)
2017/07/10 19:56:50
Done.
| |
| 12 two types of access to the system: | |
| 13 | |
| 14 * **Exclusive access** guarantees that no other callers have any access | |
| 15 exclusive or shared) to the resource while the specified command is run. | |
| 16 * **Shared access** guarantees that only other callers with shared access | |
| 17 will have access to the resource while the specified command is run. | |
| 18 | |
| 19 In short, exclusive access guarantees a task is run alone, while shared access | |
| 20 tasks may be run alongside other shared access tasks. | |
| 21 | |
| 22 Because an exclusive access task may wait indefinitely if shared access tasks | |
| 23 continue to arrive before the previous one finishes, we use a second mechanism | |
| 24 to prevent starvation of exclusive access tasks: a global drain file. This drain | |
| 25 file is created before requesting exclusive access and signals that no shared | |
| 26 access tasks should be run until the exclusive access task has had an | |
| 27 opportunity to do so, at which point the global drain file is deleted. | |
|
iannucci
2017/07/10 19:40:23
this paragraph might be a bit too detailed for a R
charliea (OOO until 10-5)
2017/07/10 19:56:50
SGTM. I deleted it for now and will revisit whethe
| |
| 28 | |
| 29 TODO(charliea): Document actual command line usage here. | |
| OLD | NEW |