Xref: news-dnh.mv.net comp.os.msdos.djgpp:1696 Path: news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!lerc.nasa.gov!lerc.nasa.gov!babar From: gantose AT lerc DOT nasa DOT gov (Dave Gantose) Newsgroups: comp.os.msdos.djgpp Subject: Re: Please define "locking" Date: Mon, 21 Aug 95 18:32:21 GMT Organization: ADF, Inc.--NASA Lewis, Cleveland, OH Lines: 41 Nntp-Posting-Host: babar.lerc.nasa.gov To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp Thank you to Charles Sandmann who wrote: >(...) >So, you don't want anything you will touch in a hardware interrupt routine >to every get paged out to disk (including the code,data,stack). If you have >enough memory on your machine that you never page (or have disabled virtual >memory) this is not a problem. If you do page, the DPMI page locking >services are a way to tell the paging mechanism to never take those pages >out of memory, and avoid the problem. I should have mentioned that I am programming for an embedded processor that will not have access to a hard drive, so I guess that if my programs don't die of memory exhaustion, then they are OK. However, the machines I develop and test upon DO have hard drives, so how would I disable virtual memory on them so that I don't have to deal with this? >(...) >Since it's very difficult to track down every memory address you might touch >in C, this is why you start worrying about GAS code so you have control over >the location of the code and data so you know exactly what to lock. The >simple fix is to buy more memory (for everyone :-) so paging is eliminated. And thanks to Mat Hostetter who wrote: >I've written DPMI interrupt handlers that properly lock memory. >Here's a quick, imprecise oversimplification of the issues involved >(...) >V2 is rock solid if you play by the rules. Unfortunately, those rules are >tricky. Even though I do not want to deal with this for my current application, I would still like to know how to do it right. Do either of you (or anyone else reading this) have a favorite example you could point me to? (I already have downloaded--but not yet studied--the Soundblaster library by Joel Hunter.) ============================================================================= Dave Gantose ADF, Inc. 2001 Aerospace Pkwy. phone: (216)977-1376 Brook Park, OH 44142 email: Gantose AT lerc DOT nasa DOT gov