PDA

View Full Version : advanced knoppix questions



redss
06-16-2004, 05:14 AM
If anybody knows the answers, I have a couple questions on the way knoppix works...

1) when running an executable for the first time since bootup, does knoppix store a copy of the executable in the ramdisk so that subsequent calls to that program will not require rereading off cdrom? If so, how long would the executable files be cached before being deleted to make room?

2) I notice that there are symbolic links in /etc that point to files on cdrom, but when edited, the link is broken and there is an edited copy in /etc.

tearinghairout
06-16-2004, 12:40 PM
1) when running an executable for the first time since bootup, does knoppix store a copy of the executable in the ramdisk so that subsequent calls to that program will not require rereading off cdrom? If so, how long would the executable files be cached before being deleted to make room?
Yes... it depends.
Knoppix, and Linux, as well as all UNIX's, and also Windows, and - now that I think about it - even DOS (in a rudimentary sort of way), have things called disk buffers.

Basically a section of RAM is set aside so that anything read from the hard disk is copied into RAM, so that if it is needed to be read again in the near future it is need not be read off disk again. This applies to anything on the disk, not just programs.

How long it stays in RAM depends on how much other stuff needs to be read. Obviously it can't keep storing everything forever, so when new stuff needs to be read in, the OS will (usually) use a "least recently used" algorithm to start getting rid of the oldest pages in order to make room for the new ones.

redss
06-16-2004, 12:53 PM
ok that makes sense!

Anyways, I had forgotten to complete part 2 of my post. I was just wondering what that type of symbolic link is called (and how its created) where editing the link and saving the file breaks the link and creates a new copy of the target.