File system in RAM?

Good time of day,

don't know whether it is possible so generally to raise the question, but I was wondering if there's any file system in RAM? For example, take a regular bar DIMM DDR2 PC6400. Speaking of narrow-minded — it's how that information is stored. It means that the memory is/can be a file system.

How are things really?

Thank you
October 8th 19 at 02:25
8 answers
October 8th 19 at 02:27
RAM is a large matrix! :-)
No matter how you thought I was kidding, but it is. There are banks on the RAM (those are the black chips torcasio of the Board). Every Bank is located permanently writable matrix. Everything inside works locations. Reading of the RAM occurs by choice of row and sabsa, and then issued information. Everything works at a certain clock cycle.

If you need to store files in RAM at the OS level, use RAM disk.
October 8th 19 at 02:29
Yes, in most distributions, /tmp is in RAM:
none /tmp tmpfs defaults 0 0<br>
The size of the shared memory which will be created by FS, can be changed when mounting.
October 8th 19 at 02:31
The first link on request in Google: "the file system in RAM"
Glad first. Thanks for the link. - Wyatt_Hartman commented on October 8th 19 at 02:34
October 8th 19 at 02:33
In Linux for this is tmpfs
Is created like this:
sudo mount-t tmpfs -o size=2G,nr_inodes=30k,mode=0777 tmpfs /mntpoint

I like using tmpfs in the script to place a large number of small temporary files, so firstly do not pull the disk, and secondly just to speed up the process.
In Linux you can usually do not create and use /dev/shm — ready file system in memory, the default size is half the OP. - Wyatt_Hartman commented on October 8th 19 at 02:36
SH is not a file system by definition (for it uses a different set of functions different from the functions FS). - mackenzie.Mraz23 commented on October 8th 19 at 02:39
October 8th 19 at 02:35
For CPU your "Planck-memory", being stuck in the charge is seen simply as a set of cells with addresses from N to M (number of cells = number of bytes in the strap, 2 GB is slightly more than 2 billion), each of which can be put 1 byte of data. But you can the file system to create it, but on the OS level.
Ie the file system there is no as such? - Wyatt_Hartman commented on October 8th 19 at 02:38
Not mean and the kernel's ramdisk and tmpfs... - mackenzie.Mraz23 commented on October 8th 19 at 02:41
No. It would be too difficult and expensive in terms of performance (since the CPU should read/write data in memory with very blogseu speed). If you write (or will write) in Assembly language, you will learn that memory is just a set of cells with addresses (numbers), and each (or several neighbouring) you can put a number or read out the number. This is the easiest and fastest way. However, we must not forget, in what cell what is stored, but it already care of the OS, compiler, runtime and the programmer.

In one cell you can write 1 byte (= 8 bits) i.e. an integer from 0 to 255. To write very large numbers or fractional, they are represented as multiple bytes.

For example, on systems on the Intel x86 processor (i.e. normal home computers):

Whole numbers (for example, a variable of type int on a 32-bit system) are stored in memory in 4 adjacent cells in binary form. The floating-point number (variable of type float/double) are stored in memory, divided into mantissa and exponent, 4 or 8 neighboring cells. Strings and texts are stored character by character, each character is encoded to a certain number (1 character in 1 cell, if you use Unicode, 1 character is stored in several cells). Images are stored pixel by pixel (1 pixel = 4 bytes, which numerically is stored, the brightness of the red, green, blue components and the transparency of the pixel). Audio (uncompressed) is also stored as a sequence of numbers.

In General, the computer − it's an advanced calculator, because everything is stored as numbers.

That is when you are in the program (if you program) write x = 1, it boils down to the fact that in certain memory cells will remain the number 1 in binary representation. - davonte commented on October 8th 19 at 02:44
October 8th 19 at 02:37
File system — an abstraction over the storage device. RAM is generally used without it, and the disks are normally used with her. But neither the first nor the second is not absolute. And there is such a thing as virtual memory, which transparently (to the application) displays the addresses of the memory sectors of the disk through the file system of the disk.
October 8th 19 at 02:39
"In fact," you have said, in OZ the data is stored as a one-dimensional array. There are no FS, only "address" a memory number (a positive integer). Therefore, in 32-bit systems, the memory size is limited to 3 gigs — more numbers in there to create.
santiga this is the third time I wrote in this issue... - Wyatt_Hartman commented on October 8th 19 at 02:42
October 8th 19 at 02:41
I ask again because I this leads to the next question — What's the difference between a hard drive and OZ? Of course, if only to consider the data storage and the file system. If the processor sees the file system on the hard disk, or it there too, only the set of cells with addresses? Or he is on a drive not looks, and the data from the hard drive first loaded into RAM?
Everything that makes the processor, it does with RAM. Directly, he does with external devices does not and only loads them into RAM and then does. How to load data in memory to hard drives: PIO (port input / output), DMA (direct access via the hard disk controller to memory).

In General, the hard disk is not arranged as a set of "cells", but as a set of blocks of 512 bytes. Here you can read or write only such unit as a whole. - Wyatt_Hartman commented on October 8th 19 at 02:44
... and by the way, the data on the hard disk can be stored and not creating a file system. More precisely, a file system in the usual sense of the word — some structures you will have to create, it will be generally speaking "file system". But the processor "understands" what the data have a structure. Memory a little differently: the CPU, the buffer broadcasts and setregistry, so that the processor "understands" the structure of memory. But it is very primitive understanding, and memory allocation etc. does OS. There are techniques for distributing data in RAM — slab , etc. - mackenzie.Mraz23 commented on October 8th 19 at 02:47
It's kind of all I wanted to clarify. Thank you all. - davonte commented on October 8th 19 at 02:50
I will add more.

The difference in the fact that the memory device is random access. You can read/write any cell in any time, and do it very quickly. The typical rate of memory — billion writes/reads per second.

In the case of the disk, is more complicated. First, dictate/write data only by blocks of a certain size, sometimes 512 bytes, sometimes 4096 bytes, sometimes more. Also, the reading process is much more complicated: it is necessary to send the disk controller corresponding command (to specify the type of operation, the memory space for data and disk space), he long (about 10 MS) will search for the desired track, move the head, then read from the disk a block of data and puts it in memory, well, or take the block from memory and writes to disk. That is, the process is significantly longer and more complicated. - Wyatt_Hartman commented on October 8th 19 at 02:53
Read about DMA, it is an interesting and very useful thing ;-) - Wyatt_Hartman commented on October 8th 19 at 02:56

Find more questions by tags File systemsMemoryOperating systems