Since remapViewOfFiles isn't atomic on Windows, it must exclusively acquire the "mongo files" lock. Otherwise, "touch" operations in other threads might try to access memory during the window when it is not mapped. See SERVER-5680, SERVER-5663.
SERVER-5520 -- As part of a larger shutdown rewrite, exitCleanly might need to change substantially. However, for now, exitCleanly() is the right way to safely shut down mongod.
… REMAPPRIVATEVIEW. this upgrade was not greedy and that was probably a bug. fixed.
The notions of exitCleanly() versus dbexit() vs _exit() in the scope of mongod shutdown need to be reconsidered. This patch just attempts to limit the scope of the issue to mongos and mongod. It would be better to limit it to just mongod, but the implementation of the ntservice behavior doesn't currently support that. SERVER-5520, SERVER-5702
…Set::init(), which are now superseded by the equivalent optimizations in CursorGenerator.
… in appropriate cases.