On GameSpot: Looking to buy a video game console?
BNET Business Network:
BNET
TechRepublic
ZDNet
TalkBack 20 of 97:
Next »
« Previous
Memory Mapped IO; direct cursor addressing
One of the strengths of Unix is memory-mapped files. Rather than treating this type of file as a stream, Unix treats it as though it were swapped-out main memory. The application simply reads memory from any address in the range. If that page (4k usually) of disk is in memory, you get it instantly; if not, a page fault brings in the page. It's random and fast. The main limitation is that the file obviously cannot be larger than will fit in your addressing space (4 gigabyte less some overhead for a Pentium 32 bit processor).

Directly addressing a cursor is very easy. You need only know the escape sequence for your particular terminal. You may remember that escape sequences are used even in good old MS DOS.

It is not a function of the operating system to position the cursor; it is entirely a function of the display system.

Knowledge of the operating system and hardware can make an enormous difference in performance and memory consumption. I've written programs in assembly language, taking advantage of this knowledge, that were ten times faster than COBOL and 1/10th the memory consumption (the on-disk image of the executable program).
Posted by: mggordon   Posted on: 07/27/05 You are currently: a Guest | Members login | Terms of Use

Alert moderator to an offensive message

Subscribe to this discussion via Email or RSS

Darn tootin'  Linux User 147560 | 07/27/05
RE: Darn Tootin'  Monkey_MCSE | 07/27/05
ZDNet is blatantly pro-MS, anti-everything else  NonZealot | 07/27/05
I Equate ZDNet To Reading The Enquirer  itanalyst | 07/27/05
the facts are in the fud on these forums, the rest is zdnet articles :P  linuxoverwindows | 07/28/05
Are you insane? ADNet is Anti-MS all they way!  John Zern | 07/27/05
Like many other sites, ZDNET is sponsored by Microsoft  IT-sys | 07/27/05
Yes, it is true that Windows is the one that is not compatible.  DonnieBoy | 07/27/05
Nope  Loverock Davidson | 07/27/05
OMG!  Roger Ramjet | 07/27/05
Time to check the phase of the moon (NT)  Loverock Davidson | 07/27/05
majority of OS's are unix  dwjunix | 07/27/05
While I agree with your basic point  Sxooter_z | 07/27/05
Can't find a file? Oh please.  hulse_kevin | 07/27/05
actually...  linuxoverwindows | 07/28/05
Nope, nope...  horusfalcon | 07/29/05
But does Unix have the right philosophy?  jorwell | 07/27/05
there is/was that cursed curses thing...  murph_z ZDNet Moderator | 07/27/05
I might be wrong but  jorwell | 07/27/05
Memory Mapped IO; direct cursor addressing  mggordon | 07/27/05
you do know that...  linuxoverwindows | 07/28/05
Yes, UNIX has the right philosophy...  prime21 | 07/27/05
Very nice!  Yen_z | 07/27/05
questions  toadlife | 07/27/05
things that won't die & big ears..  thirtyeast | 07/27/05
So You Think The Recycle Bin Is It?  PMC-CON | 07/28/05
*Yawn*  toadlife | 07/28/05
Windows explorer is IE  voska | 07/28/05
yeah...  linuxoverwindows | 07/28/05
Kill doesn't kill every process  voska | 07/28/05
process-exporer is weak!  toadlife | 07/28/05
I specifically said I wasn't comparing Windows and Unix  jorwell | 07/28/05
one drawback of everything being a stream  woot! | 07/28/05
A few curses  jorwell | 07/29/05
Seems that Macintosh  In_the_end_I_Win | 07/29/05
Unix cheap?  nomorems | 07/27/05
Unix is cheap for the manufacturers  jorwell | 07/28/05
how can you...  linuxoverwindows | 07/28/05
apple isn't expensive  dwjunix | 07/28/05
The unity of Unix  Loverock Davidson | 07/27/05
The article is still pretty solid though...  nucrash | 07/27/05
Thanks - and the key research started in the mid fifties  murph_z ZDNet Moderator | 07/27/05
Can you provide links  nucrash | 07/27/05
NT was not brand new  Richard Flude | 07/27/05
Money over progress  jorwell | 07/27/05
Maybe you took it wrong  DemonX | 07/27/05
More Gates as Edison drivel.  hulse_kevin | 07/27/05
More Internet is Driver Drivel  PMC-CON | 07/27/05
Rebuttal  Roger Ramjet | 07/27/05
Flames Originate (for me) in Sun's Lies  PMC-CON | 07/27/05
Sorry to hear that  Roger Ramjet | 07/28/05
How about self-righteousness.  Anton Philidor | 07/28/05
Interesting take  Roger Ramjet | 07/28/05
you got it right  zzz1234567890 | 07/27/05
OS snobs  auto.master | 07/27/05
I agree  Otto_Delete | 07/27/05
Re: OS snobs  none none | 07/27/05
Better OS can built.  Wagadonga | 07/27/05
no perfect OS  dwjunix | 07/27/05
Microsoft has no interest in peaceful co-existence.  hulse_kevin | 07/27/05
Linux desktop inadequacy  Yagotta B. Kidding | 07/27/05
Hidden Content Removal Tool  PMC-CON | 07/27/05
Not the same thing  Yagotta B. Kidding | 07/27/05
Really?  Richard Flude | 07/27/05
The timeline in the article stopped at least ten years ago.  Anton Philidor | 07/27/05
No, I don't agree  murph_z ZDNet Moderator | 07/27/05
Software quality.  Anton Philidor | 07/27/05
Astute observation  Roger Ramjet | 07/27/05
Right on!  murph_z ZDNet Moderator | 07/27/05
The "rich client experience" is the show.  Anton Philidor | 07/27/05
The power of genuine control.  hulse_kevin | 07/27/05
Two different views.  Anton Philidor | 07/27/05
How do you figure....  nucrash | 07/27/05
Remember the complaints about "IBM Linux"...  Anton Philidor | 07/27/05
Freedom of speech  IT_User | 07/27/05
Red Hat?  Yagotta B. Kidding | 07/27/05
Two basic OS designs exist today  toadlife | 07/27/05
What about AS/400?  jorwell | 07/28/05
Yeah there are others  toadlife | 07/28/05
Successful in the marketplace  jorwell | 08/02/05
Quite correct  Boot_Agnostic | 08/02/05
Not quite  jorwell | 08/03/05
How about the security of Windows?  aquasys | 07/27/05
Have to laugh at many of you here...  John Zern | 07/27/05
Easy.. or not.. experts say..  thirtyeast | 07/27/05
There are gppd amd bad admins  Boot_Agnostic | 07/31/05
Was there a purpose to this limited history lesson?  No_Ax_to_Grind | 07/27/05
Message has been deleted.  roaming_z | 07/28/05
Purpose  Roger Ramjet | 07/28/05
Linux is not Unix(tm)  amclaren | 07/28/05
Linux is a Unix clone  moonlitfire | 07/30/05
RE: Linux is a Unix clone  amclaren | 07/30/05
RE: Linux is a Unix clone  cbradshaw@... | 08/03/05
Linux is a Unix clone  moonlitfire | 08/11/05
UNIX is much more unified  michael_t | 08/01/05
Unix and Linux  tecpar | 08/02/05
RE: The unity of Unix  kinge | 09/27/07

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

Enterprise Applications

  • Check out some of the easiest and most powerful ways to boost productivity while saving money on your application infrastructure. See ZDNet's comprehensive Enterprise Application resource center, now!
  • New Online Dashboard
  • Read about top issues IT decision-makers face every day, plus get cost effective solutions to real life IT problems. Oracle Topline