Why not create an OS that runs in ram?











up vote
1
down vote

favorite
1












this might be the wrong StackExchange site to ask this question, but I couldn't find one better. There doesn't seem to be one for questions about Operating Systems.



I've been thinking recently about an OS that runs purely in ram, and that it would have a lot of benefits.




  • It would be much simpler to create such an OS, because you wouldn't have to deal with filesystems, caching, etc.

  • It would be much faster.

  • Programs would be easier to write because they wouldn't need to load or save anything.

  • Instead of writing source code and then compiling, programs could be directly manipulated in memory. REPLs get somewhere near this, but why not go all the way? Also LightTable is like this in that it 'lets you modify running programs', but I think it can be taken further. Obviously we would need some other way of manipulating/building programs in memory.

  • Databases would be massively simplified, as there would be no query-caching to do. They might not even be necessary at all.

  • No booting or shutting down necessary


Obviously there are problems with this approach:




  • Memory is volatile: You would have to change the hardware so that memory was always kept alive with a backup battery or something.

  • There are lots of situations where data will be too big to fit in ram. E.g. large websites with massive databases, people with huge music/video collections, etc. However, most people don't have huge video collections, they stream stuff from netflix. I.e. look at the success of the ChromeBook, which only has a 16gb SSD.

  • updating the OS in memory could be tricky, but some languages already do this e.g. Java, Erlang hot-swapping


Anyway, I must be missing something otherwise all the computer scientists who are much more intelligent than me would have done this already, but what is it?










share|improve this question
























  • Take a look at RamDisks, is that what you are thinking? There are a number of ways to run even common OSs on them if you google around more.
    – nerdwaller
    Nov 27 '13 at 19:24












  • No, what I'm talking about is getting rid of the filesystem all together. The hardware comes out of the factory with the OS already loaded in ram, there is no booting or shutting down. I realise that this can't be applied to any existing operating system (not that I know of anyway)
    – eggbert
    Nov 27 '13 at 19:30






  • 2




    I will address one point of your question: filesystem. The point of a filesystem is not to store data on a disk; it is in fact a form of database that allows you to store an arbitrary amount of arbitrarily-sized files in a contiguous memory space. Most filesystems are optimized for sequential access, a situation not applicable to random access memory, but other than that, the problem set remains the same. Also, all OSes run in RAM. All of them can work (some better than others) without a hard drive. Since memory is not cheap, we have hard drives that provide more long-term access to data
    – sleblanc
    Sep 3 '14 at 14:25








  • 1




    "because you wouldn't have to deal with filesystems", You can do that with disks as well; you can write data at random places that makes sense for your OS, but then nobody will be able to read it other than you (which is essentially what you're doing in RAM). The reason you have a file system is to keep files organized for whoever wants to access it, including yourself. How you cache such a file system is up to you.
    – Jochem Kuijpers
    Sep 3 '14 at 22:54















up vote
1
down vote

favorite
1












this might be the wrong StackExchange site to ask this question, but I couldn't find one better. There doesn't seem to be one for questions about Operating Systems.



I've been thinking recently about an OS that runs purely in ram, and that it would have a lot of benefits.




  • It would be much simpler to create such an OS, because you wouldn't have to deal with filesystems, caching, etc.

  • It would be much faster.

  • Programs would be easier to write because they wouldn't need to load or save anything.

  • Instead of writing source code and then compiling, programs could be directly manipulated in memory. REPLs get somewhere near this, but why not go all the way? Also LightTable is like this in that it 'lets you modify running programs', but I think it can be taken further. Obviously we would need some other way of manipulating/building programs in memory.

  • Databases would be massively simplified, as there would be no query-caching to do. They might not even be necessary at all.

  • No booting or shutting down necessary


Obviously there are problems with this approach:




  • Memory is volatile: You would have to change the hardware so that memory was always kept alive with a backup battery or something.

  • There are lots of situations where data will be too big to fit in ram. E.g. large websites with massive databases, people with huge music/video collections, etc. However, most people don't have huge video collections, they stream stuff from netflix. I.e. look at the success of the ChromeBook, which only has a 16gb SSD.

  • updating the OS in memory could be tricky, but some languages already do this e.g. Java, Erlang hot-swapping


Anyway, I must be missing something otherwise all the computer scientists who are much more intelligent than me would have done this already, but what is it?










share|improve this question
























  • Take a look at RamDisks, is that what you are thinking? There are a number of ways to run even common OSs on them if you google around more.
    – nerdwaller
    Nov 27 '13 at 19:24












  • No, what I'm talking about is getting rid of the filesystem all together. The hardware comes out of the factory with the OS already loaded in ram, there is no booting or shutting down. I realise that this can't be applied to any existing operating system (not that I know of anyway)
    – eggbert
    Nov 27 '13 at 19:30






  • 2




    I will address one point of your question: filesystem. The point of a filesystem is not to store data on a disk; it is in fact a form of database that allows you to store an arbitrary amount of arbitrarily-sized files in a contiguous memory space. Most filesystems are optimized for sequential access, a situation not applicable to random access memory, but other than that, the problem set remains the same. Also, all OSes run in RAM. All of them can work (some better than others) without a hard drive. Since memory is not cheap, we have hard drives that provide more long-term access to data
    – sleblanc
    Sep 3 '14 at 14:25








  • 1




    "because you wouldn't have to deal with filesystems", You can do that with disks as well; you can write data at random places that makes sense for your OS, but then nobody will be able to read it other than you (which is essentially what you're doing in RAM). The reason you have a file system is to keep files organized for whoever wants to access it, including yourself. How you cache such a file system is up to you.
    – Jochem Kuijpers
    Sep 3 '14 at 22:54













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





this might be the wrong StackExchange site to ask this question, but I couldn't find one better. There doesn't seem to be one for questions about Operating Systems.



I've been thinking recently about an OS that runs purely in ram, and that it would have a lot of benefits.




  • It would be much simpler to create such an OS, because you wouldn't have to deal with filesystems, caching, etc.

  • It would be much faster.

  • Programs would be easier to write because they wouldn't need to load or save anything.

  • Instead of writing source code and then compiling, programs could be directly manipulated in memory. REPLs get somewhere near this, but why not go all the way? Also LightTable is like this in that it 'lets you modify running programs', but I think it can be taken further. Obviously we would need some other way of manipulating/building programs in memory.

  • Databases would be massively simplified, as there would be no query-caching to do. They might not even be necessary at all.

  • No booting or shutting down necessary


Obviously there are problems with this approach:




  • Memory is volatile: You would have to change the hardware so that memory was always kept alive with a backup battery or something.

  • There are lots of situations where data will be too big to fit in ram. E.g. large websites with massive databases, people with huge music/video collections, etc. However, most people don't have huge video collections, they stream stuff from netflix. I.e. look at the success of the ChromeBook, which only has a 16gb SSD.

  • updating the OS in memory could be tricky, but some languages already do this e.g. Java, Erlang hot-swapping


Anyway, I must be missing something otherwise all the computer scientists who are much more intelligent than me would have done this already, but what is it?










share|improve this question















this might be the wrong StackExchange site to ask this question, but I couldn't find one better. There doesn't seem to be one for questions about Operating Systems.



I've been thinking recently about an OS that runs purely in ram, and that it would have a lot of benefits.




  • It would be much simpler to create such an OS, because you wouldn't have to deal with filesystems, caching, etc.

  • It would be much faster.

  • Programs would be easier to write because they wouldn't need to load or save anything.

  • Instead of writing source code and then compiling, programs could be directly manipulated in memory. REPLs get somewhere near this, but why not go all the way? Also LightTable is like this in that it 'lets you modify running programs', but I think it can be taken further. Obviously we would need some other way of manipulating/building programs in memory.

  • Databases would be massively simplified, as there would be no query-caching to do. They might not even be necessary at all.

  • No booting or shutting down necessary


Obviously there are problems with this approach:




  • Memory is volatile: You would have to change the hardware so that memory was always kept alive with a backup battery or something.

  • There are lots of situations where data will be too big to fit in ram. E.g. large websites with massive databases, people with huge music/video collections, etc. However, most people don't have huge video collections, they stream stuff from netflix. I.e. look at the success of the ChromeBook, which only has a 16gb SSD.

  • updating the OS in memory could be tricky, but some languages already do this e.g. Java, Erlang hot-swapping


Anyway, I must be missing something otherwise all the computer scientists who are much more intelligent than me would have done this already, but what is it?







memory operating-systems






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 27 '13 at 19:33

























asked Nov 27 '13 at 19:19









eggbert

13417




13417












  • Take a look at RamDisks, is that what you are thinking? There are a number of ways to run even common OSs on them if you google around more.
    – nerdwaller
    Nov 27 '13 at 19:24












  • No, what I'm talking about is getting rid of the filesystem all together. The hardware comes out of the factory with the OS already loaded in ram, there is no booting or shutting down. I realise that this can't be applied to any existing operating system (not that I know of anyway)
    – eggbert
    Nov 27 '13 at 19:30






  • 2




    I will address one point of your question: filesystem. The point of a filesystem is not to store data on a disk; it is in fact a form of database that allows you to store an arbitrary amount of arbitrarily-sized files in a contiguous memory space. Most filesystems are optimized for sequential access, a situation not applicable to random access memory, but other than that, the problem set remains the same. Also, all OSes run in RAM. All of them can work (some better than others) without a hard drive. Since memory is not cheap, we have hard drives that provide more long-term access to data
    – sleblanc
    Sep 3 '14 at 14:25








  • 1




    "because you wouldn't have to deal with filesystems", You can do that with disks as well; you can write data at random places that makes sense for your OS, but then nobody will be able to read it other than you (which is essentially what you're doing in RAM). The reason you have a file system is to keep files organized for whoever wants to access it, including yourself. How you cache such a file system is up to you.
    – Jochem Kuijpers
    Sep 3 '14 at 22:54


















  • Take a look at RamDisks, is that what you are thinking? There are a number of ways to run even common OSs on them if you google around more.
    – nerdwaller
    Nov 27 '13 at 19:24












  • No, what I'm talking about is getting rid of the filesystem all together. The hardware comes out of the factory with the OS already loaded in ram, there is no booting or shutting down. I realise that this can't be applied to any existing operating system (not that I know of anyway)
    – eggbert
    Nov 27 '13 at 19:30






  • 2




    I will address one point of your question: filesystem. The point of a filesystem is not to store data on a disk; it is in fact a form of database that allows you to store an arbitrary amount of arbitrarily-sized files in a contiguous memory space. Most filesystems are optimized for sequential access, a situation not applicable to random access memory, but other than that, the problem set remains the same. Also, all OSes run in RAM. All of them can work (some better than others) without a hard drive. Since memory is not cheap, we have hard drives that provide more long-term access to data
    – sleblanc
    Sep 3 '14 at 14:25








  • 1




    "because you wouldn't have to deal with filesystems", You can do that with disks as well; you can write data at random places that makes sense for your OS, but then nobody will be able to read it other than you (which is essentially what you're doing in RAM). The reason you have a file system is to keep files organized for whoever wants to access it, including yourself. How you cache such a file system is up to you.
    – Jochem Kuijpers
    Sep 3 '14 at 22:54
















Take a look at RamDisks, is that what you are thinking? There are a number of ways to run even common OSs on them if you google around more.
– nerdwaller
Nov 27 '13 at 19:24






Take a look at RamDisks, is that what you are thinking? There are a number of ways to run even common OSs on them if you google around more.
– nerdwaller
Nov 27 '13 at 19:24














No, what I'm talking about is getting rid of the filesystem all together. The hardware comes out of the factory with the OS already loaded in ram, there is no booting or shutting down. I realise that this can't be applied to any existing operating system (not that I know of anyway)
– eggbert
Nov 27 '13 at 19:30




No, what I'm talking about is getting rid of the filesystem all together. The hardware comes out of the factory with the OS already loaded in ram, there is no booting or shutting down. I realise that this can't be applied to any existing operating system (not that I know of anyway)
– eggbert
Nov 27 '13 at 19:30




2




2




I will address one point of your question: filesystem. The point of a filesystem is not to store data on a disk; it is in fact a form of database that allows you to store an arbitrary amount of arbitrarily-sized files in a contiguous memory space. Most filesystems are optimized for sequential access, a situation not applicable to random access memory, but other than that, the problem set remains the same. Also, all OSes run in RAM. All of them can work (some better than others) without a hard drive. Since memory is not cheap, we have hard drives that provide more long-term access to data
– sleblanc
Sep 3 '14 at 14:25






I will address one point of your question: filesystem. The point of a filesystem is not to store data on a disk; it is in fact a form of database that allows you to store an arbitrary amount of arbitrarily-sized files in a contiguous memory space. Most filesystems are optimized for sequential access, a situation not applicable to random access memory, but other than that, the problem set remains the same. Also, all OSes run in RAM. All of them can work (some better than others) without a hard drive. Since memory is not cheap, we have hard drives that provide more long-term access to data
– sleblanc
Sep 3 '14 at 14:25






1




1




"because you wouldn't have to deal with filesystems", You can do that with disks as well; you can write data at random places that makes sense for your OS, but then nobody will be able to read it other than you (which is essentially what you're doing in RAM). The reason you have a file system is to keep files organized for whoever wants to access it, including yourself. How you cache such a file system is up to you.
– Jochem Kuijpers
Sep 3 '14 at 22:54




"because you wouldn't have to deal with filesystems", You can do that with disks as well; you can write data at random places that makes sense for your OS, but then nobody will be able to read it other than you (which is essentially what you're doing in RAM). The reason you have a file system is to keep files organized for whoever wants to access it, including yourself. How you cache such a file system is up to you.
– Jochem Kuijpers
Sep 3 '14 at 22:54










4 Answers
4






active

oldest

votes

















up vote
4
down vote













You can't use RAM effectively if all you have is RAM for two reasons:




  1. If a page is dirty but not accessed, you have to keep it in RAM, even though you'd rather use RAM for other things.


  2. Any time an application might use memory or might not, you have to say no unless you can accommodate every reservation you've already made, even if most of those reservations are unlikely to ever be used, because otherwise you'd have to forcibly terminate processes.



So all you have is RAM, and you can't use it effectively. That would be a horrible recipe for a general-purpose operating system.



But the basic reason this is a bad idea is this simple -- having things other than RAM doesn't force you to use them. It simply allows you to use them if it's beneficial. You can't make things better by taking away options.






share|improve this answer





















  • What I'm saying is, with the price of ram today, you shouldn't ever need to use more storage outside that, for some use cases anyway. Also, you can make things better by taking away options, e.g. garbage collection 'takes away' low-level memory management but is better for some things.
    – eggbert
    Nov 27 '13 at 19:45












  • @eggbert Garbage collection takes away a requirement. You're talking about adding a requirement. And regardless of how cheap RAM is, there's no advantage to handicapping your ability to use it effectively.
    – David Schwartz
    Nov 27 '13 at 21:08












  • I'm not entirely sure what you mean. Doesn't garbage collection take away the option to use low-level memory management? I completely accept that this architecture takes away options, but I'm interested in the possibility that there are advantages in it, i.e. simplifying things.
    – eggbert
    Nov 27 '13 at 23:49










  • @eggbert No. There is no incompatibility between garbage collection and low-level memory management. Garbage collection takes away the requirement that you manually free everything you've allocated. It doesn't require you to do anything or take away any options you have.
    – David Schwartz
    Nov 28 '13 at 2:22




















up vote
2
down vote













Prices for RAM and disk storage differ by an order of magnitude even today. This means as storage needs increase storing everything in RAM becomes far more expensive than the alternatives. This also applies to ROM memory (has to be something non-volatile to boot the thing) where using a small amount and putting the rest of the needed programs/code on disk is a more economical choice than all in ROM.



1TB Hard drive $50 vs 1GB RAM for $30



120GB SSD $100 vs 16GB RAM for $150



I bought such an all RAM computer decades ago and actually still have it. A Tandy Model 102 with 24k of static RAM. It still had a file system of sorts as you still needed to organize and select documents and programs. Didn't catch on due to price - was $600 when I bought it.



enter image description here






share|improve this answer























  • That looks pretty awesome. How many people actually need a 1TB hard drive though? I think what I'm trying to say is that with increasing network speeds, 'the internet' is replacing the need for local storage of this magnitude, and there might be merit in having a simpler operating system without the overhead of thinking about what is in memory and what isn't.
    – eggbert
    Nov 27 '13 at 19:54






  • 1




    Still 2GB RAM + 32GB flash is around the same price as 3GB RAM and allows storing a few movies for when the internet connection is down.
    – Brian
    Nov 27 '13 at 19:59










  • @eggbert The internet isn't always a solution. Sure, streaming videos and music is possible, but you want software to be available at any time (think about big software packages and games). You can stream virtual desktop sessions, yes, but running software on your own computer, you can't afford 20ms each time you need a bit of executable code or whatever. Also, some information (e.g. bank accounts, private photos, etc.) you'd like to store privately -- think about the recent iCloud leak.
    – Jochem Kuijpers
    Sep 3 '14 at 22:58


















up vote
1
down vote













You can have a linux OS run completely from RAM (once booted from a persistent medium or from PXE, that is).



You just need to have a custom initrd create a ramfs and mount this as root after populating it.



There are some practical constraints though as RAM is relatively expensive and small compared to SSD's, HDD's etc.






share|improve this answer




























    up vote
    0
    down vote













    Embedded OSs frequently can run completely in RAM, depending on the application. I wrote one a few years back for an Atmel micro controller.



    Back in the 1980s there were a variety of systems that could run completely in RAM. Technically you didn't need any drive in the original IBM PC or XT, as they could boot straight into a BASIC interpreter built into ROM. All the early Commodore machines (like the VIC-20, C64, 4+, C16, etc.) (and many others) were the same.



    In the 1990s, the most popular consumer system with the entire OS executed in RAM was PalmOS, which originally had no filesystem of any sort (internally everything was stored in one big (non-relational) RAM record database. If you happen to remember PRC and PDB files, there were pretty much just dumps of these RAM records for a specific application resource or data store). It wasn't until they introduced external storage options that any sort of filesystem access was built into the OS, and even then if you didn't use SD or MMC cards in your device, the system would run completely from RAM. Apps didn't have to "load", as they ran pretty much in-situ (although they could allocate stack and heap space, naturally).



    The Linux kernel can be configured to run completely from within RAM. This isn't really all that useful for general-purpose computing (where the device won't know what you're going to throw at it), but if you know your specific memory bounds for a given application, you can configure and run it this way. You won't have any swap, and you're going to have to use something to load the kernel in the first place with whatever app code you want to run, but it can be done (although of course in a real-world scenario, you'll want to at least have some sort of firmware to store the kernel and application data for if/when the device is reinitialized).



    As to why we don't frequently see this in practice outside certain areas of the embedded space? Even embedded devices need to initialize from something, and these days flash memory is pretty cheap and reliable, making it pretty easy and cheap to at least add some small solid-state storage to boot from. And unless your volume for your device is large, having ROM chips made to contain your OS for bootstrapping/reinitialization can be expensive. Of course, in more general purpose PCs where the manufacturer doesn't know what sort of load you intend to put onto the system, being able to have persistent storage that can be used as a backing store for swapping virtual memory pages is a huge benefit. But for more custom needs that don't require massive storage, there are a variety of os's out there that can run completely from RAM only.






    share|improve this answer




















      protected by Ramhound Dec 6 at 17:37



      Thank you for your interest in this question.
      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



      Would you like to answer one of these unanswered questions instead?














      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      4
      down vote













      You can't use RAM effectively if all you have is RAM for two reasons:




      1. If a page is dirty but not accessed, you have to keep it in RAM, even though you'd rather use RAM for other things.


      2. Any time an application might use memory or might not, you have to say no unless you can accommodate every reservation you've already made, even if most of those reservations are unlikely to ever be used, because otherwise you'd have to forcibly terminate processes.



      So all you have is RAM, and you can't use it effectively. That would be a horrible recipe for a general-purpose operating system.



      But the basic reason this is a bad idea is this simple -- having things other than RAM doesn't force you to use them. It simply allows you to use them if it's beneficial. You can't make things better by taking away options.






      share|improve this answer





















      • What I'm saying is, with the price of ram today, you shouldn't ever need to use more storage outside that, for some use cases anyway. Also, you can make things better by taking away options, e.g. garbage collection 'takes away' low-level memory management but is better for some things.
        – eggbert
        Nov 27 '13 at 19:45












      • @eggbert Garbage collection takes away a requirement. You're talking about adding a requirement. And regardless of how cheap RAM is, there's no advantage to handicapping your ability to use it effectively.
        – David Schwartz
        Nov 27 '13 at 21:08












      • I'm not entirely sure what you mean. Doesn't garbage collection take away the option to use low-level memory management? I completely accept that this architecture takes away options, but I'm interested in the possibility that there are advantages in it, i.e. simplifying things.
        – eggbert
        Nov 27 '13 at 23:49










      • @eggbert No. There is no incompatibility between garbage collection and low-level memory management. Garbage collection takes away the requirement that you manually free everything you've allocated. It doesn't require you to do anything or take away any options you have.
        – David Schwartz
        Nov 28 '13 at 2:22

















      up vote
      4
      down vote













      You can't use RAM effectively if all you have is RAM for two reasons:




      1. If a page is dirty but not accessed, you have to keep it in RAM, even though you'd rather use RAM for other things.


      2. Any time an application might use memory or might not, you have to say no unless you can accommodate every reservation you've already made, even if most of those reservations are unlikely to ever be used, because otherwise you'd have to forcibly terminate processes.



      So all you have is RAM, and you can't use it effectively. That would be a horrible recipe for a general-purpose operating system.



      But the basic reason this is a bad idea is this simple -- having things other than RAM doesn't force you to use them. It simply allows you to use them if it's beneficial. You can't make things better by taking away options.






      share|improve this answer





















      • What I'm saying is, with the price of ram today, you shouldn't ever need to use more storage outside that, for some use cases anyway. Also, you can make things better by taking away options, e.g. garbage collection 'takes away' low-level memory management but is better for some things.
        – eggbert
        Nov 27 '13 at 19:45












      • @eggbert Garbage collection takes away a requirement. You're talking about adding a requirement. And regardless of how cheap RAM is, there's no advantage to handicapping your ability to use it effectively.
        – David Schwartz
        Nov 27 '13 at 21:08












      • I'm not entirely sure what you mean. Doesn't garbage collection take away the option to use low-level memory management? I completely accept that this architecture takes away options, but I'm interested in the possibility that there are advantages in it, i.e. simplifying things.
        – eggbert
        Nov 27 '13 at 23:49










      • @eggbert No. There is no incompatibility between garbage collection and low-level memory management. Garbage collection takes away the requirement that you manually free everything you've allocated. It doesn't require you to do anything or take away any options you have.
        – David Schwartz
        Nov 28 '13 at 2:22















      up vote
      4
      down vote










      up vote
      4
      down vote









      You can't use RAM effectively if all you have is RAM for two reasons:




      1. If a page is dirty but not accessed, you have to keep it in RAM, even though you'd rather use RAM for other things.


      2. Any time an application might use memory or might not, you have to say no unless you can accommodate every reservation you've already made, even if most of those reservations are unlikely to ever be used, because otherwise you'd have to forcibly terminate processes.



      So all you have is RAM, and you can't use it effectively. That would be a horrible recipe for a general-purpose operating system.



      But the basic reason this is a bad idea is this simple -- having things other than RAM doesn't force you to use them. It simply allows you to use them if it's beneficial. You can't make things better by taking away options.






      share|improve this answer












      You can't use RAM effectively if all you have is RAM for two reasons:




      1. If a page is dirty but not accessed, you have to keep it in RAM, even though you'd rather use RAM for other things.


      2. Any time an application might use memory or might not, you have to say no unless you can accommodate every reservation you've already made, even if most of those reservations are unlikely to ever be used, because otherwise you'd have to forcibly terminate processes.



      So all you have is RAM, and you can't use it effectively. That would be a horrible recipe for a general-purpose operating system.



      But the basic reason this is a bad idea is this simple -- having things other than RAM doesn't force you to use them. It simply allows you to use them if it's beneficial. You can't make things better by taking away options.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 27 '13 at 19:33









      David Schwartz

      56.2k684128




      56.2k684128












      • What I'm saying is, with the price of ram today, you shouldn't ever need to use more storage outside that, for some use cases anyway. Also, you can make things better by taking away options, e.g. garbage collection 'takes away' low-level memory management but is better for some things.
        – eggbert
        Nov 27 '13 at 19:45












      • @eggbert Garbage collection takes away a requirement. You're talking about adding a requirement. And regardless of how cheap RAM is, there's no advantage to handicapping your ability to use it effectively.
        – David Schwartz
        Nov 27 '13 at 21:08












      • I'm not entirely sure what you mean. Doesn't garbage collection take away the option to use low-level memory management? I completely accept that this architecture takes away options, but I'm interested in the possibility that there are advantages in it, i.e. simplifying things.
        – eggbert
        Nov 27 '13 at 23:49










      • @eggbert No. There is no incompatibility between garbage collection and low-level memory management. Garbage collection takes away the requirement that you manually free everything you've allocated. It doesn't require you to do anything or take away any options you have.
        – David Schwartz
        Nov 28 '13 at 2:22




















      • What I'm saying is, with the price of ram today, you shouldn't ever need to use more storage outside that, for some use cases anyway. Also, you can make things better by taking away options, e.g. garbage collection 'takes away' low-level memory management but is better for some things.
        – eggbert
        Nov 27 '13 at 19:45












      • @eggbert Garbage collection takes away a requirement. You're talking about adding a requirement. And regardless of how cheap RAM is, there's no advantage to handicapping your ability to use it effectively.
        – David Schwartz
        Nov 27 '13 at 21:08












      • I'm not entirely sure what you mean. Doesn't garbage collection take away the option to use low-level memory management? I completely accept that this architecture takes away options, but I'm interested in the possibility that there are advantages in it, i.e. simplifying things.
        – eggbert
        Nov 27 '13 at 23:49










      • @eggbert No. There is no incompatibility between garbage collection and low-level memory management. Garbage collection takes away the requirement that you manually free everything you've allocated. It doesn't require you to do anything or take away any options you have.
        – David Schwartz
        Nov 28 '13 at 2:22


















      What I'm saying is, with the price of ram today, you shouldn't ever need to use more storage outside that, for some use cases anyway. Also, you can make things better by taking away options, e.g. garbage collection 'takes away' low-level memory management but is better for some things.
      – eggbert
      Nov 27 '13 at 19:45






      What I'm saying is, with the price of ram today, you shouldn't ever need to use more storage outside that, for some use cases anyway. Also, you can make things better by taking away options, e.g. garbage collection 'takes away' low-level memory management but is better for some things.
      – eggbert
      Nov 27 '13 at 19:45














      @eggbert Garbage collection takes away a requirement. You're talking about adding a requirement. And regardless of how cheap RAM is, there's no advantage to handicapping your ability to use it effectively.
      – David Schwartz
      Nov 27 '13 at 21:08






      @eggbert Garbage collection takes away a requirement. You're talking about adding a requirement. And regardless of how cheap RAM is, there's no advantage to handicapping your ability to use it effectively.
      – David Schwartz
      Nov 27 '13 at 21:08














      I'm not entirely sure what you mean. Doesn't garbage collection take away the option to use low-level memory management? I completely accept that this architecture takes away options, but I'm interested in the possibility that there are advantages in it, i.e. simplifying things.
      – eggbert
      Nov 27 '13 at 23:49




      I'm not entirely sure what you mean. Doesn't garbage collection take away the option to use low-level memory management? I completely accept that this architecture takes away options, but I'm interested in the possibility that there are advantages in it, i.e. simplifying things.
      – eggbert
      Nov 27 '13 at 23:49












      @eggbert No. There is no incompatibility between garbage collection and low-level memory management. Garbage collection takes away the requirement that you manually free everything you've allocated. It doesn't require you to do anything or take away any options you have.
      – David Schwartz
      Nov 28 '13 at 2:22






      @eggbert No. There is no incompatibility between garbage collection and low-level memory management. Garbage collection takes away the requirement that you manually free everything you've allocated. It doesn't require you to do anything or take away any options you have.
      – David Schwartz
      Nov 28 '13 at 2:22














      up vote
      2
      down vote













      Prices for RAM and disk storage differ by an order of magnitude even today. This means as storage needs increase storing everything in RAM becomes far more expensive than the alternatives. This also applies to ROM memory (has to be something non-volatile to boot the thing) where using a small amount and putting the rest of the needed programs/code on disk is a more economical choice than all in ROM.



      1TB Hard drive $50 vs 1GB RAM for $30



      120GB SSD $100 vs 16GB RAM for $150



      I bought such an all RAM computer decades ago and actually still have it. A Tandy Model 102 with 24k of static RAM. It still had a file system of sorts as you still needed to organize and select documents and programs. Didn't catch on due to price - was $600 when I bought it.



      enter image description here






      share|improve this answer























      • That looks pretty awesome. How many people actually need a 1TB hard drive though? I think what I'm trying to say is that with increasing network speeds, 'the internet' is replacing the need for local storage of this magnitude, and there might be merit in having a simpler operating system without the overhead of thinking about what is in memory and what isn't.
        – eggbert
        Nov 27 '13 at 19:54






      • 1




        Still 2GB RAM + 32GB flash is around the same price as 3GB RAM and allows storing a few movies for when the internet connection is down.
        – Brian
        Nov 27 '13 at 19:59










      • @eggbert The internet isn't always a solution. Sure, streaming videos and music is possible, but you want software to be available at any time (think about big software packages and games). You can stream virtual desktop sessions, yes, but running software on your own computer, you can't afford 20ms each time you need a bit of executable code or whatever. Also, some information (e.g. bank accounts, private photos, etc.) you'd like to store privately -- think about the recent iCloud leak.
        – Jochem Kuijpers
        Sep 3 '14 at 22:58















      up vote
      2
      down vote













      Prices for RAM and disk storage differ by an order of magnitude even today. This means as storage needs increase storing everything in RAM becomes far more expensive than the alternatives. This also applies to ROM memory (has to be something non-volatile to boot the thing) where using a small amount and putting the rest of the needed programs/code on disk is a more economical choice than all in ROM.



      1TB Hard drive $50 vs 1GB RAM for $30



      120GB SSD $100 vs 16GB RAM for $150



      I bought such an all RAM computer decades ago and actually still have it. A Tandy Model 102 with 24k of static RAM. It still had a file system of sorts as you still needed to organize and select documents and programs. Didn't catch on due to price - was $600 when I bought it.



      enter image description here






      share|improve this answer























      • That looks pretty awesome. How many people actually need a 1TB hard drive though? I think what I'm trying to say is that with increasing network speeds, 'the internet' is replacing the need for local storage of this magnitude, and there might be merit in having a simpler operating system without the overhead of thinking about what is in memory and what isn't.
        – eggbert
        Nov 27 '13 at 19:54






      • 1




        Still 2GB RAM + 32GB flash is around the same price as 3GB RAM and allows storing a few movies for when the internet connection is down.
        – Brian
        Nov 27 '13 at 19:59










      • @eggbert The internet isn't always a solution. Sure, streaming videos and music is possible, but you want software to be available at any time (think about big software packages and games). You can stream virtual desktop sessions, yes, but running software on your own computer, you can't afford 20ms each time you need a bit of executable code or whatever. Also, some information (e.g. bank accounts, private photos, etc.) you'd like to store privately -- think about the recent iCloud leak.
        – Jochem Kuijpers
        Sep 3 '14 at 22:58













      up vote
      2
      down vote










      up vote
      2
      down vote









      Prices for RAM and disk storage differ by an order of magnitude even today. This means as storage needs increase storing everything in RAM becomes far more expensive than the alternatives. This also applies to ROM memory (has to be something non-volatile to boot the thing) where using a small amount and putting the rest of the needed programs/code on disk is a more economical choice than all in ROM.



      1TB Hard drive $50 vs 1GB RAM for $30



      120GB SSD $100 vs 16GB RAM for $150



      I bought such an all RAM computer decades ago and actually still have it. A Tandy Model 102 with 24k of static RAM. It still had a file system of sorts as you still needed to organize and select documents and programs. Didn't catch on due to price - was $600 when I bought it.



      enter image description here






      share|improve this answer














      Prices for RAM and disk storage differ by an order of magnitude even today. This means as storage needs increase storing everything in RAM becomes far more expensive than the alternatives. This also applies to ROM memory (has to be something non-volatile to boot the thing) where using a small amount and putting the rest of the needed programs/code on disk is a more economical choice than all in ROM.



      1TB Hard drive $50 vs 1GB RAM for $30



      120GB SSD $100 vs 16GB RAM for $150



      I bought such an all RAM computer decades ago and actually still have it. A Tandy Model 102 with 24k of static RAM. It still had a file system of sorts as you still needed to organize and select documents and programs. Didn't catch on due to price - was $600 when I bought it.



      enter image description here







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Nov 27 '13 at 20:14

























      answered Nov 27 '13 at 19:45









      Brian

      8,1681833




      8,1681833












      • That looks pretty awesome. How many people actually need a 1TB hard drive though? I think what I'm trying to say is that with increasing network speeds, 'the internet' is replacing the need for local storage of this magnitude, and there might be merit in having a simpler operating system without the overhead of thinking about what is in memory and what isn't.
        – eggbert
        Nov 27 '13 at 19:54






      • 1




        Still 2GB RAM + 32GB flash is around the same price as 3GB RAM and allows storing a few movies for when the internet connection is down.
        – Brian
        Nov 27 '13 at 19:59










      • @eggbert The internet isn't always a solution. Sure, streaming videos and music is possible, but you want software to be available at any time (think about big software packages and games). You can stream virtual desktop sessions, yes, but running software on your own computer, you can't afford 20ms each time you need a bit of executable code or whatever. Also, some information (e.g. bank accounts, private photos, etc.) you'd like to store privately -- think about the recent iCloud leak.
        – Jochem Kuijpers
        Sep 3 '14 at 22:58


















      • That looks pretty awesome. How many people actually need a 1TB hard drive though? I think what I'm trying to say is that with increasing network speeds, 'the internet' is replacing the need for local storage of this magnitude, and there might be merit in having a simpler operating system without the overhead of thinking about what is in memory and what isn't.
        – eggbert
        Nov 27 '13 at 19:54






      • 1




        Still 2GB RAM + 32GB flash is around the same price as 3GB RAM and allows storing a few movies for when the internet connection is down.
        – Brian
        Nov 27 '13 at 19:59










      • @eggbert The internet isn't always a solution. Sure, streaming videos and music is possible, but you want software to be available at any time (think about big software packages and games). You can stream virtual desktop sessions, yes, but running software on your own computer, you can't afford 20ms each time you need a bit of executable code or whatever. Also, some information (e.g. bank accounts, private photos, etc.) you'd like to store privately -- think about the recent iCloud leak.
        – Jochem Kuijpers
        Sep 3 '14 at 22:58
















      That looks pretty awesome. How many people actually need a 1TB hard drive though? I think what I'm trying to say is that with increasing network speeds, 'the internet' is replacing the need for local storage of this magnitude, and there might be merit in having a simpler operating system without the overhead of thinking about what is in memory and what isn't.
      – eggbert
      Nov 27 '13 at 19:54




      That looks pretty awesome. How many people actually need a 1TB hard drive though? I think what I'm trying to say is that with increasing network speeds, 'the internet' is replacing the need for local storage of this magnitude, and there might be merit in having a simpler operating system without the overhead of thinking about what is in memory and what isn't.
      – eggbert
      Nov 27 '13 at 19:54




      1




      1




      Still 2GB RAM + 32GB flash is around the same price as 3GB RAM and allows storing a few movies for when the internet connection is down.
      – Brian
      Nov 27 '13 at 19:59




      Still 2GB RAM + 32GB flash is around the same price as 3GB RAM and allows storing a few movies for when the internet connection is down.
      – Brian
      Nov 27 '13 at 19:59












      @eggbert The internet isn't always a solution. Sure, streaming videos and music is possible, but you want software to be available at any time (think about big software packages and games). You can stream virtual desktop sessions, yes, but running software on your own computer, you can't afford 20ms each time you need a bit of executable code or whatever. Also, some information (e.g. bank accounts, private photos, etc.) you'd like to store privately -- think about the recent iCloud leak.
      – Jochem Kuijpers
      Sep 3 '14 at 22:58




      @eggbert The internet isn't always a solution. Sure, streaming videos and music is possible, but you want software to be available at any time (think about big software packages and games). You can stream virtual desktop sessions, yes, but running software on your own computer, you can't afford 20ms each time you need a bit of executable code or whatever. Also, some information (e.g. bank accounts, private photos, etc.) you'd like to store privately -- think about the recent iCloud leak.
      – Jochem Kuijpers
      Sep 3 '14 at 22:58










      up vote
      1
      down vote













      You can have a linux OS run completely from RAM (once booted from a persistent medium or from PXE, that is).



      You just need to have a custom initrd create a ramfs and mount this as root after populating it.



      There are some practical constraints though as RAM is relatively expensive and small compared to SSD's, HDD's etc.






      share|improve this answer

























        up vote
        1
        down vote













        You can have a linux OS run completely from RAM (once booted from a persistent medium or from PXE, that is).



        You just need to have a custom initrd create a ramfs and mount this as root after populating it.



        There are some practical constraints though as RAM is relatively expensive and small compared to SSD's, HDD's etc.






        share|improve this answer























          up vote
          1
          down vote










          up vote
          1
          down vote









          You can have a linux OS run completely from RAM (once booted from a persistent medium or from PXE, that is).



          You just need to have a custom initrd create a ramfs and mount this as root after populating it.



          There are some practical constraints though as RAM is relatively expensive and small compared to SSD's, HDD's etc.






          share|improve this answer












          You can have a linux OS run completely from RAM (once booted from a persistent medium or from PXE, that is).



          You just need to have a custom initrd create a ramfs and mount this as root after populating it.



          There are some practical constraints though as RAM is relatively expensive and small compared to SSD's, HDD's etc.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 3 '14 at 23:17









          user4004936

          1311




          1311






















              up vote
              0
              down vote













              Embedded OSs frequently can run completely in RAM, depending on the application. I wrote one a few years back for an Atmel micro controller.



              Back in the 1980s there were a variety of systems that could run completely in RAM. Technically you didn't need any drive in the original IBM PC or XT, as they could boot straight into a BASIC interpreter built into ROM. All the early Commodore machines (like the VIC-20, C64, 4+, C16, etc.) (and many others) were the same.



              In the 1990s, the most popular consumer system with the entire OS executed in RAM was PalmOS, which originally had no filesystem of any sort (internally everything was stored in one big (non-relational) RAM record database. If you happen to remember PRC and PDB files, there were pretty much just dumps of these RAM records for a specific application resource or data store). It wasn't until they introduced external storage options that any sort of filesystem access was built into the OS, and even then if you didn't use SD or MMC cards in your device, the system would run completely from RAM. Apps didn't have to "load", as they ran pretty much in-situ (although they could allocate stack and heap space, naturally).



              The Linux kernel can be configured to run completely from within RAM. This isn't really all that useful for general-purpose computing (where the device won't know what you're going to throw at it), but if you know your specific memory bounds for a given application, you can configure and run it this way. You won't have any swap, and you're going to have to use something to load the kernel in the first place with whatever app code you want to run, but it can be done (although of course in a real-world scenario, you'll want to at least have some sort of firmware to store the kernel and application data for if/when the device is reinitialized).



              As to why we don't frequently see this in practice outside certain areas of the embedded space? Even embedded devices need to initialize from something, and these days flash memory is pretty cheap and reliable, making it pretty easy and cheap to at least add some small solid-state storage to boot from. And unless your volume for your device is large, having ROM chips made to contain your OS for bootstrapping/reinitialization can be expensive. Of course, in more general purpose PCs where the manufacturer doesn't know what sort of load you intend to put onto the system, being able to have persistent storage that can be used as a backing store for swapping virtual memory pages is a huge benefit. But for more custom needs that don't require massive storage, there are a variety of os's out there that can run completely from RAM only.






              share|improve this answer

























                up vote
                0
                down vote













                Embedded OSs frequently can run completely in RAM, depending on the application. I wrote one a few years back for an Atmel micro controller.



                Back in the 1980s there were a variety of systems that could run completely in RAM. Technically you didn't need any drive in the original IBM PC or XT, as they could boot straight into a BASIC interpreter built into ROM. All the early Commodore machines (like the VIC-20, C64, 4+, C16, etc.) (and many others) were the same.



                In the 1990s, the most popular consumer system with the entire OS executed in RAM was PalmOS, which originally had no filesystem of any sort (internally everything was stored in one big (non-relational) RAM record database. If you happen to remember PRC and PDB files, there were pretty much just dumps of these RAM records for a specific application resource or data store). It wasn't until they introduced external storage options that any sort of filesystem access was built into the OS, and even then if you didn't use SD or MMC cards in your device, the system would run completely from RAM. Apps didn't have to "load", as they ran pretty much in-situ (although they could allocate stack and heap space, naturally).



                The Linux kernel can be configured to run completely from within RAM. This isn't really all that useful for general-purpose computing (where the device won't know what you're going to throw at it), but if you know your specific memory bounds for a given application, you can configure and run it this way. You won't have any swap, and you're going to have to use something to load the kernel in the first place with whatever app code you want to run, but it can be done (although of course in a real-world scenario, you'll want to at least have some sort of firmware to store the kernel and application data for if/when the device is reinitialized).



                As to why we don't frequently see this in practice outside certain areas of the embedded space? Even embedded devices need to initialize from something, and these days flash memory is pretty cheap and reliable, making it pretty easy and cheap to at least add some small solid-state storage to boot from. And unless your volume for your device is large, having ROM chips made to contain your OS for bootstrapping/reinitialization can be expensive. Of course, in more general purpose PCs where the manufacturer doesn't know what sort of load you intend to put onto the system, being able to have persistent storage that can be used as a backing store for swapping virtual memory pages is a huge benefit. But for more custom needs that don't require massive storage, there are a variety of os's out there that can run completely from RAM only.






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Embedded OSs frequently can run completely in RAM, depending on the application. I wrote one a few years back for an Atmel micro controller.



                  Back in the 1980s there were a variety of systems that could run completely in RAM. Technically you didn't need any drive in the original IBM PC or XT, as they could boot straight into a BASIC interpreter built into ROM. All the early Commodore machines (like the VIC-20, C64, 4+, C16, etc.) (and many others) were the same.



                  In the 1990s, the most popular consumer system with the entire OS executed in RAM was PalmOS, which originally had no filesystem of any sort (internally everything was stored in one big (non-relational) RAM record database. If you happen to remember PRC and PDB files, there were pretty much just dumps of these RAM records for a specific application resource or data store). It wasn't until they introduced external storage options that any sort of filesystem access was built into the OS, and even then if you didn't use SD or MMC cards in your device, the system would run completely from RAM. Apps didn't have to "load", as they ran pretty much in-situ (although they could allocate stack and heap space, naturally).



                  The Linux kernel can be configured to run completely from within RAM. This isn't really all that useful for general-purpose computing (where the device won't know what you're going to throw at it), but if you know your specific memory bounds for a given application, you can configure and run it this way. You won't have any swap, and you're going to have to use something to load the kernel in the first place with whatever app code you want to run, but it can be done (although of course in a real-world scenario, you'll want to at least have some sort of firmware to store the kernel and application data for if/when the device is reinitialized).



                  As to why we don't frequently see this in practice outside certain areas of the embedded space? Even embedded devices need to initialize from something, and these days flash memory is pretty cheap and reliable, making it pretty easy and cheap to at least add some small solid-state storage to boot from. And unless your volume for your device is large, having ROM chips made to contain your OS for bootstrapping/reinitialization can be expensive. Of course, in more general purpose PCs where the manufacturer doesn't know what sort of load you intend to put onto the system, being able to have persistent storage that can be used as a backing store for swapping virtual memory pages is a huge benefit. But for more custom needs that don't require massive storage, there are a variety of os's out there that can run completely from RAM only.






                  share|improve this answer












                  Embedded OSs frequently can run completely in RAM, depending on the application. I wrote one a few years back for an Atmel micro controller.



                  Back in the 1980s there were a variety of systems that could run completely in RAM. Technically you didn't need any drive in the original IBM PC or XT, as they could boot straight into a BASIC interpreter built into ROM. All the early Commodore machines (like the VIC-20, C64, 4+, C16, etc.) (and many others) were the same.



                  In the 1990s, the most popular consumer system with the entire OS executed in RAM was PalmOS, which originally had no filesystem of any sort (internally everything was stored in one big (non-relational) RAM record database. If you happen to remember PRC and PDB files, there were pretty much just dumps of these RAM records for a specific application resource or data store). It wasn't until they introduced external storage options that any sort of filesystem access was built into the OS, and even then if you didn't use SD or MMC cards in your device, the system would run completely from RAM. Apps didn't have to "load", as they ran pretty much in-situ (although they could allocate stack and heap space, naturally).



                  The Linux kernel can be configured to run completely from within RAM. This isn't really all that useful for general-purpose computing (where the device won't know what you're going to throw at it), but if you know your specific memory bounds for a given application, you can configure and run it this way. You won't have any swap, and you're going to have to use something to load the kernel in the first place with whatever app code you want to run, but it can be done (although of course in a real-world scenario, you'll want to at least have some sort of firmware to store the kernel and application data for if/when the device is reinitialized).



                  As to why we don't frequently see this in practice outside certain areas of the embedded space? Even embedded devices need to initialize from something, and these days flash memory is pretty cheap and reliable, making it pretty easy and cheap to at least add some small solid-state storage to boot from. And unless your volume for your device is large, having ROM chips made to contain your OS for bootstrapping/reinitialization can be expensive. Of course, in more general purpose PCs where the manufacturer doesn't know what sort of load you intend to put onto the system, being able to have persistent storage that can be used as a backing store for swapping virtual memory pages is a huge benefit. But for more custom needs that don't require massive storage, there are a variety of os's out there that can run completely from RAM only.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Sep 3 '14 at 22:29









                  Yaztromo

                  1




                  1

















                      protected by Ramhound Dec 6 at 17:37



                      Thank you for your interest in this question.
                      Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                      Would you like to answer one of these unanswered questions instead?



                      Popular posts from this blog

                      flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                      Mangá

                       ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕