D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] sticky bits and stuff

 

On Sun, 14 Jun 2015, Simon Waters wrote:


The "t" for sticky bit is for "text", it use to change handling of text memory segment on Unix. One of those failed optimisations, just let the maths decide what to cache.

It wasn't failed at the time - it meant that the "text" of a program ie. the actual code, not data would stick around in core, or in swap after use. That meant that the next person using it would find it was quicker to load.

In those days you would optimise placement of partitions on disks to optimise seek times, or use a partition on your fastest disk for swap. Optimising would mean placing the swap partition on an area of disk physically closest to where you think the head might be - typically you might have the first partition being 'root', then /bin then swap then /usr - this was before /usr/bin and /usr was where the users files would be (forerunner to /home) so the disks physical head would move between /bin and /usr with swap in the middle, so it was quicker to reach swap...

Typical programs with the sticky bit set would be ls, ed, sort and so on.

Nowadays with more memory and zero seek time SSDs it's easier to ignore all that and just let the filesystem keep an in-core cache of stuff - but when you only had 128KW of core memory and 6 users to cope with every little optimisation you could do was worth it, and with spinning rust it might still be, hence the sadness of old sysadmins when Linuxes starting using one big parition, oh, just tack swap on at the end of the disk )-:

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq