In short, none of Haskell's methods of parallelization require you to be aware of threads or synchronization.
I once went looking to see if there was a way to do it from within the application code itself - something like mlock()/mlockall() in posix - and I couldn't find an equivalent, which may just be a reflection of my own inexperience with the Windows API but I figured I would throw that out there anyway.
The function you're looking for is VirtualLock. You may also look into increasing the process's minimum working set with SetProcessWorkingSetSize. This requires SeIncreaseBasePriorityPrivilege.
A process that is scanning through a file is supposed to use the FILE_FLAG_SEQUENTIAL_SCAN hint so that the cached pages are recycled first, but that doesn't always happen. It also doesn't help that csrss will ask the kernel to minimize a process's working set when its main window is minimized.
But "page out" means something in RAM is going to disk - if I ever want it back in RAM, I'll have to wait.
On Windows it doesn't necessarily mean that. Writing a page to disk != needing to read it back from disk later.
Each process has a working set. Pages in the working set are mapped actively into the process's VM with page tables. The memory manager aggressively trims these pages from the working set and puts them into standby memory. A page in standby is not mapped for reading (and more importantly for writing) anywhere in the system. Part of putting the page into standby involves writing a copy to disk. This will show up as a page written.
From standby, the page can be used one of two ways:
The nice thing about this model is that disk activity isn't needed to either reuse pages or bring them back at the time of the demand. It helps avoid the ugly condition of paging one process out while paging another in at the same time, causing disk thrashing.
Since Vista, the memory manager will preemptively re load pages that have been bumped out of standby back into standby if there is free unused memory available. Also since Vista, each page of memory has a priority from 0-7 that determines which pages are preferred to keep in RAM. In all versions of NT based Windows, memory mapping is very similar to page file management and will use many of the same counters (including standby memory, transition and hard faults, pages in/out). Memory mapping is used by lots of components internally and for loading executable images and libraries. Also, file caching is logically based in many ways on memory mapping, although the counters are different in many cases.
I don't know why this reply is labeled redundant except to show a bias against stating a legitimate concerns and problems with Wikipedia. It sounds like there is a broken mod system here on
/. as well. Not that this is also stating the obvious.
It could be that the post just before that one by Nwallins (1059978) on 2009.11.25 13:41 (#30228784) makes the same mention of http://en.wikipedia.org/wiki/Wikipedia:Be_bold. I wouldn't have marked either as redundant though because the other was first and the second one has more material.
I also wouldn't say that
A large government has far more opportunities for graft and corruption than a small one.
That is a good point, but as I see it, having a smaller government would mean fewer congressmen to bribe to reach a majority vote, allowing the company to expand its influence for the same budget. If you meant "small government" figuratively, you are right; a large government tends to have far more public projects to try to push through congress. However, without these, they would then focus their attack on public policy, resulting in additional lobbying against regulation and anything else detrimental to business yet necessary to ensure the rights and safety of the people.
Regardless of the literal and figurative size of the government, however, lobbyists had, have, and will continue to have more influence than entire political parties IMO.
People who want to get laid?
impossible. people on facebook are too busy growing crops in FarmVille or doing epic crimes in Mafia Wars or making creepy comments on attractive friends-of-friends's photos to have time to have mere sex.
If at first you don't succeed, you are running about average.