Slashdot Mirror


Convert Unneeded VRAM Into A Storage Device

Pawel Kot writes "Have you ever thought why does your graphics card has so much memory? Do You think you have not enough RAM or awfully slow swap file? Do you need fast ram-disk or diskless machine? Go for it! Take one of these cheap 128MB graphics cards and enjoy the speed. Michal Schulz wrote a good description on how to take the advantage of not used video card memory."

67 of 239 comments (clear)

  1. I can't help but think.... by Julius+X · · Score: 5, Insightful

    Isn't this a bit wasteful? I mean you can buy 128mb of memory for a LOT cheaper than one of those "ultra cheap 128mb graphics cards".

    I'll stick with buying RAM and using my graphics card for what it was designed for. Besides...this only applies to X users anyway.

    --

    -Julius X
    remove "-whatkindofspamdoyoutakemefor-" from email to send
    1. Re:I can't help but think.... by garcia · · Score: 2

      if people are going to have a computer come w/a video card that has 64mb of VRAM or they have only part time need for VRAM then they can use this as a fast alternative to physical space for swap.

    2. Re:I can't help but think.... by deft · · Score: 3

      i think this technique is for the geel of it, not really for the practicality.

      its one of those mountains geeks climb because its there.

      --

      There's nothing Intelligent about Intelligent Design.
    3. Re:I can't help but think.... by PD · · Score: 2

      The art would be improved if there was some way to use the memory as a display buffer AND as a disk. I think it might look pretty neat to watch a grep -r work on that puppy.

    4. Re:I can't help but think.... by Anonymous Coward · · Score: 2, Interesting

      What if all banks or the memory addressable by the controller are filled? This is a nifty little solution. I currently have a slightly older machine that is maxed with 768 megs of PC133 memory (3 banks, max support 256 per bank).

      It's currently being employed as a database and fileserver. There is a possible project coming up where the database will be quite a bit larger--768 will probably be used up--but this is not really essential. A ramdisk may be necessary. I could go out and buy a new machine, but I don't have to. I could use this fun method. This is a nifty solution for a ramdisk.

      Are there any PCI cards on the market that are made just for this purpose? e.g. not a video card, but just a PCI card with DDR or DIMM banks and maybe a controller (not talking about those cpu/dimm pci machine on a card setups).

    5. Re:I can't help but think.... by jareds · · Score: 4, Informative

      Besides...this only applies to X users anyway.

      That's not true. You don't need to use X to do this, you just need a video card. In fact, if you're just using the machine in console mode, you may as well use your video memory for swap or something.

    6. Re:I can't help but think.... by JabberWokky · · Score: 2
      Reading from a display buffer doesn't affect what you see, so nothing would visibly happen during the grep.

      One good pedantic answer deserves another:

      If the inode table were onscreen, the "last access" date would be getting reset all over the place.

      (Incidently, I used to run programs on the Apple ][ like this - flip over to hgr or gr and watch them execute).

      --
      Evan (no reference)

      --
      "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    7. Re:I can't help but think.... by Istealmymusic · · Score: 4, Funny
      Not only in console mode, but I can't help but think of uses in headless boxes i.e. servers. Thanks to this article, I might have just found a use for the 1 AGP and 7 spare PCI slots on my fileserver...now I just need to find 8 128MB video cards, and I'll have a 1GB VRAM! Combined with three 1GB DDR sticks, one can now finally max out the Pentium architecture's limitation of 4GB addressable RAM.

      Next week: Using the new fangled chipped-and-removable 4MB CMOS ICs (as found in Gigabyte's dual BIOS) to trade files with your friends in lieu of floppy diskettes. Nevermind the price tag.

      --
      "The lesson to be learned is not to take the comments on slashdot too literally." --Vinnie Falco, BearShare
    8. Re:I can't help but think.... by rmohr02 · · Score: 2

      I'd love to know that as well--I'd never thought of that. I can't find RAM that'll fit in my system right now. Supposedly my system is using PC2100 DIMM RDRAM, but when I buy that it doesn't seem to fit. A PCI card like you mention would work nicely to allow for multiple types of RAM. The only problem I foresee is that PCI cards are kind of close together and there might not be room to put extra RAM in either the top or bottom of the card. I'm sure there are ways to work around this though.

    9. Re:I can't help but think.... by friscolr · · Score: 3, Interesting
      Isn't this a bit wasteful? I mean you can buy 128mb of memory for a LOT cheaper than one of those "ultra cheap 128mb graphics cards".

      sometimes we get servers thrown in our laps that already have gfx cards which aren't needed. my last Sun came with 128mb video card plus an onboard 64mb card. i don't use either one since i use serial console on the thing.

      I'm working on cd's that will install themselves into memory filesystems. Problem is, to get a decent set of apps i need a lot of memory. Using vram would be very nice, maybe not for a machine that i would spec out since i'd buy it with enough RAM, but what about borrowing/hijacking machines? Imagine using this cd to go to library, boot computer from cd, cd ejects (so there's no trace of you since upon reboot, mem is wiped), you walk on. what you left behind: a machine running gnutella and using memory file systems to store files on. getting more space from the vram would be essential.

    10. Re:I can't help but think.... by WasterDave · · Score: 2

      No, this is a great idea. My main machine dual boots, Linux for work, 98se for games. Since I use the XFree nv driver, there's a bit chunk of memory in my video card that's doing nothing. Hey, shit, most of my video card is doing nothing but I digress.

      So I can swap onto it. Or use it for /tmp or something. Great idea.

      BTW, geek challenge: Use opengl2 shader instructions to do something useful other than accelerate games - bit parallel math cruches for compression video, say. Or crack DES3.

      Dave

      --
      I write a blog now, you should be afraid.
    11. Re:I can't help but think.... by addaon · · Score: 2

      Pentium architecture's limit is 64GB.

      --

      I've had this sig for three days.
    12. Re:I can't help but think.... by Alsee · · Score: 2

      That's not 'interesting'. That's illegal and stupid.

      No, it isn't.
      Booting a publicly accessible computer from a CD is not illegal, and running gnutella is not illegal.

      -

      --
      - - You can't take something off the Internet! That's like trying to take pee out of a swimming pool.
    13. Re:I can't help but think.... by rmohr02 · · Score: 2

      I was going from memory (no pun intended) so I might have messed up a little. I know it's RDRAM because a sticker on the RAM itself says so.

    14. Re:I can't help but think.... by Gossy · · Score: 2

      http://www.cenatek.com/ make rocket drives, sound like what you're after. They're PCI cards that are filled with up to 4GB (soon 8GB) of RAM per card.

      They even support Linux :)

    15. Re:I can't help but think.... by addaon · · Score: 2

      64GB. 36 bit. Talking pentium here, not itanium.

      --

      I've had this sig for three days.
  2. Dur... by Loligo · · Score: 5, Insightful


    If you're THAT low on memory, you're not likely to have a 128 meg video card.

    Or a 64 meg card, even.

    -l

  3. Wow! Useful AS! by Kragg · · Score: 5, Funny

    Cool! Finally I have somewhere to store my Quake 3 savegames - on the spare memory of my laptop's 16meg graphics card!

    Or maybe not...

    --
    If you can't see this, click here to enable sigs.
    1. Re:Wow! Useful AS! by thelinuxking · · Score: 2

      Yeah, it would be a great idea. I really like how when you would restart your computer, it automatically would remove all those disc cluttering save game files.

    2. Re:Wow! Useful AS! by Corrado · · Score: 2

      This sounds like a GREAT place to store a virus. It's just like the clock virus on the Amiga; it stored itself in the clock memory, thereby surviving reboots. Pretty cool stuff.

      Now all we need is some really cool hacker to write a neato virus for us... Any volunteers? :)

      --
      KangarooBox - We make IT simple!
  4. Chances are... by thelinuxking · · Score: 3, Interesting

    If you HAVE a new 128 mb video card (which isn't that cheap!), you probably also have a fast processor and motherboard, and lots of memory anyway.

    I strongly doubt you would buy a fast processor with an agp motherboard (needed for the card), and desperately needed memory so badly, that you take from the 128 mb video card.

    1. Re:Chances are... by Sycraft-fu · · Score: 2

      Well there actually are some that are fairly cheap. They are just basic accelerators with minimal capabilites and a lot of RAM. Not sure why you'd want one, but you can get them for like $40-$50, made by SiS.

      Of course this is still more expensive than all RAM except for RDRAM (which is about the same price) so is still silly. And yes, most people who oen 128MB video cards own something like a GeForce 4 and can thereofr afford to back that up with plenty of system RAM.

    2. Re:Chances are... by superpeach · · Score: 2

      Who cares? its something to do while waiting for the next linux kernel release to appear. Oh, and it is nice for machines with which you dont use the graphics card at all (which came with one for some reason) - like those which just sit there being all firewally and only ever get poked by a serial console when things go bad.

    3. Re:Chances are... by adolf · · Score: 2

      Nevermind that 128 meg cards are not quite as cheap as the author alludes. If a man came up to you on the street and offered you a 64 or 128 megabyte DIMM, of proper type for your system, would you not take it home, plug it in, and enjoy it, all while being thankful for the most fortunate occasion?

      Not long ago, I built a new Athlon XP desktop box (Win98, non-taxing business apps and light browsing) with a 64 meg S3 card, with s-video and composite NTSC outputs, some motion compensation bullshit, and terrible 3D performance. My old V3 2000 smoked it on just about everything during a comparative burn-in session, with a K6-2.

      The V3 has 16 megs of RAM. The S3 has four times as much. And since it's nearly useless for anything OpenGL and it's driving a fixed 1024x768 LCD, it's never going to use more than 4 megs of that RAM for a framebuffer.

      I picked the S3 because it was -cheap-. Cheaper than 32meg nVidia cards, cheaper than off-brand Voodoo3 cards made in Korea with surplus, post-nVidia GPUs, cheaper than Trident, cheaper than a Riva128 or a 2 meg Matrox, or any of ATi's available offerings.

      I realize that S3 is dead, and will always be (thanks, SonicBlue - and I'll never have an empeg now, either). But the driver is stable, and the machine will be running the same install of 98 until some catastrophic hardware failure makes cause for something different. As long as it performs acceptably with IE's smooth scrolling features, and the wind-up start menu included with 98SE, all is golden.

      So, cheap&stable is the order of the day.

      If I were building a headless Linux box instead of a more interactive machine, I'd have chosen the same card. I reiterate: I could not find a cheaper AGP video card from any retailer that I was purchasing other items from. (gotta factor in shipping costs, yaknow...)

      Getting ~60 megs of really fucking fast swapspace -for free- sounds like a winner, to me. And if you still think it's a bad idea, search Slashdot for old discussions of using CompactFlash cards as swap. Talk about silly, expensive means of adding virtual RAM...

      I'd run something like this in a heartbeat on a headless machine, or one not destined for 3D work. Noone needs 16 megs, let alone 32, 64, or 128 just for a framebuffer. Might as well do something useful with it, even if it is slightly more expensive than an equal-capacity DIMM.

      It is, once again, free.

  5. anyone remember velvet jones.... eddie murphy snl? by deft · · Score: 2

    is it just me, but as i was trying to decipher the english in the post, i could just hear him saying, "Hi, have you ever thought why does your graphic card has so much memory?"

    i usually could care, but this post reads like ghetto yoda.

    --

    There's nothing Intelligent about Intelligent Design.
  6. Next week on Slashdot... by ergo98 · · Score: 5, Funny

    ...How to use that "cheap" P4 as a, err, inexpensive coffee warmer.

  7. Don't knock it, it's still a cool hack. by Ted_Green · · Score: 3, Insightful

    So what if it's cheaper to buy ram, or that it's not effecient or what not. Half the hacks posted on Slashdot tend to be next to useless anyways.

    It's a cool hack, simple as that.

  8. yah - works well by cullenfluffyjennings · · Score: 3, Insightful

    The AGP interface is much faster than the memory interface on most recent intel based machines. I do computer vision where a bunch of scratch pad memory is required - the memory on the graphics card is fast and can interlace with acces to main memory. Rumour has it many games take advantage of this. In Linux you can do it with X stuff and in Windows you can use DirectX to do it.

    1. Re:yah - works well by MisterBlister · · Score: 2
      The AGP interface is much faster than the memory interface on most recent intel based machines.

      This might be true in theory but its not even close to true in practice. Memory access via AGP only hits about 10% of its theoretical maximum with current video cards. And read speeds are attrocious because the videocard designers assume there's going to be lots of data going from the CPU to VRAM but not much coming back.

      So, to parrot all the other posts saying this, this hack is completely useless, regardless of any cool factor you might find in it. There's absolutely no way I can imagine anyone finding a REAL use for this in practice.

    2. Re:yah - works well by be-fan · · Score: 2

      The AGP interface, at 1 GB/sec, is less than 1/3'rd the speed of the memory interface (3.2 GB/sec). Now, that speed is only attainable through deep buffering (basically, block transfers). Writing and reading to video memory from the CPU is, and always will be, extremely, hideously, painfully slow. Slow to the point where the XRender guys (read their mailing list) are talking about pulling blocks of data of the vid card, compositing them with the CPU, and putting them back on the vidcard.

      --
      A deep unwavering belief is a sure sign you're missing something...
  9. speed? by awing0 · · Score: 4, Interesting

    Would the speed of the VRAM be affected by the AGP read back bandwidth issue? I'm looking for the story that was posted on slashdot a while back, but the search function is less than adequate.

    On another note, this would be usefull for older machines that only have SIMMS and use EDO/FP RAM which is a lot more expensive than todays SD/DDR RAM. But, alas, those old machine don't have AGP ports. So, really, I don't see the point to this.

    --
    Cthulhu Saves.
    1. Re:speed? by psavo · · Score: 2

      But, alas, those old machine don't have AGP ports. So, really, I don't see the point to this.

      There's some PCI cards out there. I don't know how much memory they have (mine GF2PCI has 32 meg). Quick check reveals some 64Meg cards, which is not bad (compared to 64Meg SIMMs..).
      Bigger problem IMO is power consumption. GF2 seems to eat some juice even without heavy 3D. Also if you have some rather shitty PCI cards, you really have to choose place of grapphics card well, SB live was one example of this b0rkiness. Anyway, 5PCI slots, 1 for real use and 4 x64meg each. that would be nice..

      --
      fucktard is a tenderhearted description
  10. Hm. by Wakko+Warner · · Score: 2

    I guess, since you can't use your texture RAM in Linux anyway (unless you want to watch 3d screen savers), you might as well put all the RAM on that GeForce 4 to use somehow.

    - A.P.

    --
    "Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
    1. Re:Hm. by be-fan · · Score: 2

      Actually, the extra memory space can be used by X to cache pixmaps, allowing them to be blitted to the frame buffer quicker.

      --
      A deep unwavering belief is a sure sign you're missing something...
  11. Re: Oh, it can be useful all right by Anonymous Coward · · Score: 2, Interesting

    Here's some instances...

    I just happen to have a nVidia geForce2go which I'm using in vesa mode becasue the nvidia module is proprietary...

    Now I can swap to the video memory I'm not using and put that memory to use.

    How about using that video memory for /tmp on headless servers? (Its common to leave a video card in headless servers for maintanance).

    I just don't understand why people are so negative when people have come up with a new way to show just how flexible the linux kernel can be... just because some feature doesn't meet your needs doesn't mean it doesn't meet mine.

    If you want a one size fit all solution, then try some of those companies in the northwest part of the country.

  12. Re:What the hell can I do with that? by Ed+Avis · · Score: 5, Informative

    VRAM can be read and written at the same time - at least on the video card. And it should be possible to use the video hardware to blit around chunks of memory very quickly. I wonder if there are any algorithms (apart from those to manipulate a bitmapped display) which could be specially coded to take advantage of this hardware?

    --
    -- Ed Avis ed@membled.com
  13. Prior Art by Istealmymusic · · Score: 2, Interesting
    Heh, does anyone remember the virii that spread through the MS-DOS console VRAM? It was a pain at LAN parties where we would swap vidcards all the time. I can't recall the name, but it TSR'd in B800:0000 real mode. You can view the VRAM in Windows or DOS using debug:
    C:\>debug
    -db800:0 B800:0000 2D 07 64 07 62 07 38 07-30 07 30 07 3A 07 30 07 -.d.b.8.0.0.:.0.

    This goes to show how virus authors's creativity evolves pretty fast, its funny how nowadays someone is showing how to use VRAM for legitimate purposes. Who would have known? Those crazy VXers thought of it first.

    --
    "The lesson to be learned is not to take the comments on slashdot too literally." --Vinnie Falco, BearShare
    1. Re:Prior Art by twenex · · Score: 2, Funny

      Your Grandma goes to Lan parties???

    2. Re:Prior Art by Istealmymusic · · Score: 2

      Used to, but sadly she passed away last year. In real life. :( She will be missed, and not only because our clan moved down several ranks.

      --
      "The lesson to be learned is not to take the comments on slashdot too literally." --Vinnie Falco, BearShare
    3. Re:Prior Art by jelle · · Score: 2

      As far as I can remember, the firmware would usually be at 0xC800:0 (and would be executed if the fingerprint is there). Anyways, 0xb800:0 is the screen, which can contain anything, but usually contains ASCII characters, not encoded assembly instructions, which would be visible as garbage on the screen...

      Anyways again, if the 'virus' was in RAM, then swapping a video card would erase the virus, because that usually requires a powercycle of the card...

      I'm guessing that at your LAN parties you had a virus that spread through the harddisk and FLASH ROM on particular brands of video cards. Some clown must have written a virus specifically to spread during LAN parties... Who else would use a video card they just met without protection? ;-)

      --
      --- Hindsight is 20/20, but walking backwards is not the answer.
  14. Re:No by BurntHombre · · Score: 4, Insightful
    "Why does your graphics card have so much..."

    Is probably better.

    The best option, however, would be to not pick on the grammar skills of an English-as-a-second-language writer, unless you care to put your Polish language skills on display for us all.

  15. Hidden Security by Anonymous Coward · · Score: 2, Interesting

    Say you want the hide "data", outside of normal memory. This a great way to add secure memory.

    Write a fast bitblit routine to erase the "hidden memory. Use the graphic engine to add real time xor of crypto keys.

    Don't think of it as just memory but think of it as secret memory.

    Shaun

  16. Temporary use of VRAM by The+Monster · · Score: 3, Informative
    Isn't this a bit wasteful?
    It would be if you bought the card for the express purpose of using the VRAM that way. When I saw this, I had a flashback. When I was using DOS 5/6, with the then-revolutionary ability to remap memory into Upper Memory Blocks between the ROMs and VRAM, I ran into a problem using that memory.

    Most of the drivers and TSRs that I wanted to load in the space originally allocated for monochrome video (a 32K block between B0000 and B7FFF) required more space to load than to run so I came up with the solution of 'borrowing' some VRAM and wrote the Video Hole package to do just that. I used a BIOS call to change the display page from 0 to 6 (for reasons I never quite understood, 7 didn't work on my old Trident 8900) and 'borrowed' 24000 bytes (6 pages of VRAM) from the VRAM to allow a program (say MSCDEX?) to fit in there, then 'recalled' the loan, changing back to page 0. That extra 24K more than took care of the transient portion of a lot of programs that otherwise couldn't use the Video Hole.

    I don't know if anyone else ever used the darned thing (nobody ever sent me the $5 shareware fee for doing so) but it got uploaded to a bunch of BBSes and works in the real mode phase of Win95 and 98 - if you have hardware with real mode drivers that don't know how to load low and relocate the resident portion high, it will do the job fine.

    --

    [100% ISO 646 Compliant]
    SVM, ERGO MONSTRO.

  17. This used to be useful, once upon a time. by SETIGuy · · Score: 2, Interesting

    I used a similar technique on my XT compatible after I upgraded it with a VGA card with 256KB of RAM on it (long after everyone had thrown away their XTs). So long as you managed to avoid writing into the visible screen, a lot of it could be used for storage (with a bit of work on the page selection registers). I still have that machine. It's got 640k on the main board, 256k on the VGA, and 2 MB on an EMS 4.0 board. (2.875 MB total) There were times when I used every byte.

    Of course there's a big difference between boosting a maxed out XT and expanding the capacity of your P4 2.8Ghz from 2GB to 2.064GB.

  18. Re:Old School DOS Memory Managers by Safety+Cap · · Score: 4, Interesting
    ~create a handful more conventional memory beyond the 640k~
    During one QA session with QEMM 6.x, we managed to create something in the neighborhood of 900k (!) conventional memory. If memory serves, the trick was to stealth the roms out with QEMM, copy command.com onto Kernl386.exe and fire up Win 3.1 (if any of you punks who didn't live on the top floor of 150 Pico remember different, please chip in).
    --
    Yeah, right.
  19. Why not knock it? by Wakko+Warner · · Score: 2

    The guy probably spent *days* figuring this thing out, and, for what? Who will use this? What value does it provide? It's a cool hack, sure, but it serves no point. If you're going to hack something, at least make the end result worthwhile.

    Some people love hacking their cars, but they don't use their gas tank to hold their washer fluid simply because it's possible to do so.

    - A.P.

    --
    "Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
  20. Re:What the hell can I do with that? by not_cub · · Score: 5, Interesting
    Yes there are. I attempted to write a program to find the weak Schur numbers using this (I needed to bitshift bit arrays larger than 32-bits a lot, and I figured a way that a video card could do this well, especially on this problem). The real problem with this approach was the bandwidth back to the processor mentioned in a slashdot article not so long ago. Most consumer video cards just aren't designed to send data back to the processor fast.

    not_cub

    --
    q='echo "q=$s$q$s;s=$b$s;b=$b$b;$q"';s=\';b=\\;echo "q=$s$q$s;s=$b$s;b=$b$b;$q"
  21. Been there, done that by leighklotz · · Score: 2

    Although Alan Kay et. al. designed the Xerox Alto to use 80% of its resources for the Graphical User Interface (the real innovation -- understanding that the purpose of the computer is its user interface), SmallTalk needed extra memory and used the bottom part of the screen video memory for its stack. As a result, you could see when something crashed or went into infinite recursion.

  22. Great place to place viral code? by eddy · · Score: 3

    Just kidding. No one would be nasty and put viral code where no scanner has gone before.

    --
    Belief is the currency of delusion.
  23. Isn't this what Quartz Extreme is all about? by JohnsonWax · · Score: 4, Interesting

    Basically Apple is finding a use for all of that VRAM while users are futzing around not playing 3D games. Granted, it's finding interesting ways to accelerate 2D video and using the AGP to pull from main RAM as well, but it's in the same sprit as stuffing random data in there.

    Rather than buy an extra card for this purpose, the question to ask is how much of that 128MB am I using day-to-day. If the answer is *none* (as Apple determined) then this is a good thing.

    1. Re:Isn't this what Quartz Extreme is all about? by Wesley+Felter · · Score: 2

      The answer is never none, since the framebuffer has to be stored in video RAM.

  24. 128 megs!!! by SiIverFish · · Score: 2, Insightful

    wow! 128 megs of ram! for the low low price of only $400!!!! yeah, maybe in 1994!

  25. Why so much RAM? by yancey · · Score: 2, Interesting

    I've often wondered why operating systems today require so much RAM in the first place. Most people just want to browse the web, check their email, and perhaps play some music. Why does Windows, or any other OS, require such resources to pull off these relatively simple tasks?

    --
    Ouch! The truth hurts!
    1. Re:Why so much RAM? by Elbereth · · Score: 2

      If you just want to get on the web, check your e-mail, and perhaps play some music, then why do you have a computer? Sell your PC and buy a PDA or cell phone.

      Why do operating systems require so much memory? They don't. You can get onto the internet with a 486DX/33, 340MB IDE hard drive, 16MB RAM, 14" VGA monitor, Windows 95 (or Linux 1.x), and 14.4Kbps modem. Floppy drive optional.

      In fact, about two or three years ago, I bought a system like that for $50 ($25 for the 486 PC and $25 for the VGA monitor). I used it as a web server, after I dug up a USRobotics Courier v.34ter (33.6K) external modem. I upgraded the flash ROM on the Courier to support 56Kbps, got a dial-up account at a local ISP, and installed RedHat 5.2 (the oldest RedHat CD I could find after searching for five minutes). The CDROM, one of the hard drives, a serial port, and some other miscellaneous hardware failed after a while, but it kept chugging on, until I finally replaced it with a DEC Multia.

      Why do operating systems today use so much RAM? Because of the User Experience. If you want to have a bunch of services (or daemons) running in the background, you're going to need lots of RAM. Do you want your applications to load quickly? Well, one option you have at your disposal is to partially load the application at bootup, then keep that portion in memory permanently. That eats up a lot of memory. Maybe you don't use the application so often, but you don't want it to take five minutes or more to load. Well, you can cache frequently accessed data, the directory structure, extended attributes, etc. Depending on how efficient your cache is, you can get away using small amounts or huge amounts of RAM. Of course, the law of diminishing returns applies here, as well.

      Speaking of efficiency, take a look at the programs written for MS DOS in the early 1980s. Most of them were written in assembler. When people started using higher level languages, the memory footprint increased (tremendously, in some cases, where inexperienced programmers did not optimize their code at all, allowing that faster processors and more memory would cover up their experience). When developers use object oriented, interpreted, high level languages, the memory footprint explodes and the execution speed becomes unbearable, except under the fastest processors. Try running a large Java application on your 486/33 or Pentium 75. I bet it won't run too quickly.

      Why does the operating system provide all these services, features, and user experience goodies? Because users want the operating system to do so. If you don't, then try using a real-time, microkernel based operating system. QNX is an example of this. MSDOS, a glorified program loader, is a somewhat decent example of a minimalist kernel distributed with the bare minimum of tools necessary to boot up a PC. It probably couldn't even boot up some modern PCs, given that it is a 16 bit real-mode app, and we're pushing the boundaries of 32 bit computing.

      In short, features suck up bandwidth, speed, and memory. You can't run XP on a 486, because it preloads IE6 (and other apps) into memory at bootup, caches everything, runs as resolutions unsupported by your Trident 8900C video card, and has so many things popping up, sliding away, and running in the background, your poor 486 processor and ISA video card would be unable to keep up.

      Nobody said you had to upgrade beyond your 486/33 and MSDOS 6.x. It still works just fine, I'm sure, and you'll probably notice that WordPerfect for DOS loads up extremely quickly.... much faster than Office XP does.

      Why do people upgrade? They want programs to have talking, dancing paper clips. WordPefect for DOS doesn't even have a single wizard, just a text help screen.

  26. geel == geek appeal ??? by XNormal · · Score: 2

    i think this technique is for the geel of it, not really for the practicality.

    Never heard this one before. If it's a typo you may have just coined new jargon.

    --
    Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
  27. We've been here before actually by Skuld-Chan · · Score: 2

    My old amiga could do this. My A1200 had 2 megs of vram and when its 8 megs of fast ram was used up the system would often start moving into that memory. Thing is it slowed down the computer considerably.

    Even my A3000 can do this with Cybervision (RTG software) once fast ram was used up it could use the memory on the video card as zorro expansion memory (ie memory attached to the system expansion bus).

    Neat thing was it did this all dynamically and automatically - without you having to specify space or anything.

    1. Re:We've been here before actually by vidarh · · Score: 2
      Actually all Amiga's back to the original A1000 can do that. The Amigas essentially had two memory buses: One for the CPU and all the auxilliary chips (referred to as "chipram" - this included the video chip, timers, audio, etc.) and one that was exclusively accessible by the CPU ("fastram")

      Some models came only with chipram as default.

      Running programs from "chipram" was slow, since the CPU was unable to access it and would have to wait whenever any of the other chips accessed it.

      When you allocated memory, you could choose to request a specific type of memory (if you needed the memory to be accessible to the auxilliary chips, you'd request chip ram, if you needed the speed you'd request fastram) or not care, in which case fast ram was allocated unless there was no big enough block of fastram available.

    2. Re:We've been here before actually by Skuld-Chan · · Score: 2

      Your probably right - it might have been some cv option I was playing around with. I still have the computer. I do remember you could access rtg memory as fastram with the right hack.

  28. Re:Old School DOS Memory Managers by Spoing · · Score: 2
    Not possible in _graphics_mode_. Reason: Graphics memory at the time was in the 640K+ range. As soon as a program enabled that uses graphics, it accesses the remapped conventional memory and you have contention for the same address space.

    IF you have a program that can write outside that space for graphics operations, and you remap just about everything, you could theoretically get most of the first meg as conventional -- in theory only or in short run tests where you don't care what works or how well it works.

    --
    A firewall can not protect you from yourself. Turn off what you do not need. Do not use the firewall to do your work.
  29. servers anyone? by Praeluceo · · Score: 2

    I don't know about anyone else in here, but I actually plan on trying to implement this. We all seem to be overlooking one great big niche here: servers. I run an AMD K6-II as my server, it has a single stick of 128 MB RAM. It also has an old 4 MB video card in an AGP 2x slot, that means I can add 4 MB of 132 MHz RAM, totalling my physical RAM out to 132 MB. No, that isn't very much, but hey, do I run X on my server?
    No.
    Do I have a video card sitting in my AGP slot?
    Yes.
    Is there a legitimate reason -not- to use that card for something at least?
    NO!!!

    Sure, my desktop has 512 MB RAM, and 64 MB VRAM, I don't need to dip into that extra RAM, but for my server, that's 4 more MB that I have available now before I have to access a terribly slow swap file. Besides, isn't this the main use of *NIX anyway, webserving? All modern PCs have AGP slots now, if you run your own server, and it has a PII or newer, chances are good it has AGP support, at -least- 1x. Chances are also good you have a video card lying around. So why not do something cool with it, rather than collect dust?

    Just a thought guys.

  30. if only.. by Suppafly · · Score: 2

    now if only i could find "one of these cheap 128MB graphics cards" so I could "enjoy the speed"

  31. cool, now all we need is... by __aahlyu4518 · · Score: 2

    a way to use the unused processor power of that gfx card to run an extra seti@home ;-)

  32. Gamecube audio ram by mypalmike · · Score: 2, Insightful

    This is actually a fairly common practice in Gamecube programming, only using audio ram. The GC has a measly 24 Megs of main ram and a whopping 16 Megs of audio ram. The transfer is reasonably fast, and it certainly makes it easier to port a PS2 engine which from the PS which has 32 Megs. There was an article in Game Developer not too long ago about automating this as virtual ram using the PowerPC's memory-mapping capabilities rather than the manual approach usually taken.

    --
    There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
  33. Combine with slow disk swap? by Zo0ok · · Score: 2

    I have got a Pentium 200 MMX with 128 Mb of ECC EDO, no free memory slots. It sounds quite fair to buy a 64 Mb PCI graphics card for less than $100, if I could use like 60 Mb for fast swap.

    BUT: What if I put 60 MB swap on this fast VRAM-swap, and another 256 MB swap on an old, rotten and slow IDE drive? Will Linux detect that the first swap is faster and make extensive use of it, or will the slow 256 MB swap ruin my performance anyways?

  34. Re:Go home please, Linux kernel by be-fan · · Score: 2

    I never said that you couldn't do the same thing in Windows. I said that it speaks well of the UNIX APIs that such obscure functionality can be access through entirely generic APIs. The fact that you can just go ahead and use standard mmap functions to map random bits of memory is genuinely cool to those (like me) who value some elegence and beauty in software architecture. And thanks for the great example, by the way. DirectX is exactly what I'm talking about. Specific APIs to access generic functionality. Why should I have to use a different API to map graphics memory vs mapping regular memory vs mapping a file? Its just not clean! But it characterizes the Windows way of doing things.

    PS> As for the comments about my intelligence and my spelling:

    1) I've known DirectX since I was in the tenth grade. Learned Win32 just after I learned the C++ standard library.

    2) I just got off summer break, it was late at night, and I was typing that on a laptop keyboard, so fuck off!

    --
    A deep unwavering belief is a sure sign you're missing something...
  35. Re:Old School DOS Memory Managers by Safety+Cap · · Score: 2
    Not possible in _graphics_mode_.
    I'm not talking about graphics mode: the whole jazz about command.com allows you to run a "dos shell" in protected mode. Lucky for you, I found my old copy of Unauthorized Windows 95 by Andrew Schulman (IDB Books Worldwide, 1994). Let me quote from Chapter 6: Win386 and MSDPMI (pp 161-2)
    Writing in Windows Tech Journal (March 1992), David Thielen, then a Microsoft employee, noted:
    Win386 isn't really even part of Windows. It's a preemptive multitasking kernel that controls multiple virtual machines. Once Win386 has initialized itself, it loads Windows in the system VM (the main virtual machine that always exists). However, it could just as easily load COMMAND.COM instead, resulting in a multitasking DOS. (No, I won't tell you how to do this.)
    Well, after Chapter 5's discussion of how to make DOSX.EXE load something other than the Windows kernel, it should be fairly apparent how to do the same thing with WIN386.EXE. Just as DOSX.EXE insists on running KRNL286.EXE or KRNL386.EXE, WIN386.EXE (actually, the SHELL VxD within WIN386) insists on running KRNL386.EXE But just as with DOSX, WIN386 will run any file called KRNL386.EXE: even COMMAND.COM, if you rename it!
    The point isn't that you're running graphics mode, or not. The point is that COMMAND.COM thinks that it can get to the first meg of memory without that pesky text thing taking up space at B000h-B7FFh (remember, the ROMs at 0xA000-0xAFFF, 0xB800-0xC800, and 0xF000-0xFFFF are all gone thanks to QEMM).
    --
    Yeah, right.
  36. Re:Old School DOS Memory Managers by Spoing · · Score: 2
    The point isn't that you're running graphics mode, or not. The point is that COMMAND.COM thinks that it can get to the first meg of memory without that pesky text thing taking up space at B000h-B7FFh (remember, the ROMs at 0xA000-0xAFFF, 0xB800-0xC800, and 0xF000-0xFFFF are all gone thanks to QEMM).

    Video memory typically starts at A000, and can start lower. Video ROMs are typically at C000-C800. B000-B800 is for monochrome (MGA). With that trivia out of the way...

    While the book you quote is good, you're out of your element. For one, I don't need to quote his book as I was there and know what I'm talking about .

    Loading something somewhere means nothing if it can't survive there. Adapters can initialize from A000-10000h without warning the OS or memory manager. This means corrupted programs or data. To use one piece of memory or another required much machine-specific tinkering. To use a contiguous block required quite a few rare circumstances.

    Loading anything above 1M leads to the program thinking (rightly) that it is still in the first meg. -- and it will attempt to write into the first meg if it can be executed at all. Usually, it can't. _DOS_ programs in the first meg run in real mode meaning that they will do things that are illegal in protected mode unless rewritten. _All_ programs above the first meg run in protected mode or don't run at all. (Nit: A small space called the HMA at 1M+ through 1M+~64K can still execute in real mode, though they would have to be patched or they would still attempt to write into the first 64K.)

    Once you handle all those problems in your code you end up with a protected mode program that no longer needs real mode. No real mode, no reason to use the first meg -- just allocate the memory from the OS/memory manager and let it mess with the first meg if it needs to. That's why DOS sucked so bad -- no memory to do jack unless you avoided it entirely.

    I worked at Qualitas -- makers of 386MAX (similar to QEMM). I debugged and tested MAX, compressed system BIOSes, a seperate 286 memory manager (yes, they existed), and a memory diagnostics program (RamExam). Shulman's book is a wee bit thicker because of the work that I and a few others at Qualitas did using debuggers that could do odd things like boot DOS from DOS -- not a big deal now, but an unreal thing to design back in the day unless you had specialized hardware.

    --
    A firewall can not protect you from yourself. Turn off what you do not need. Do not use the firewall to do your work.