Sticky bit?

Andreas Kessemeier akes at mcshh.hanse.de
Tue Mar 26 04:56:20 AEST 1991


gilbertd at p4.cs.man.ac.uk (Dave Gilbert) writes:
>In <6704 at navy28.UUCP> seda at motcid.UUCP (Joseph W. Seda) writes:
>>What does the stick bit do?  
>As far as I'm aware what it does is do something like try and keep programs
>in memory -so that say you have 20 people using vi on a machine, it ould
>only hold 1 copy and also it would keep  it in memory so its available immediatly

Sorry, but only a half hit :-)

The sticky bit doesn't tell the system to hold the job in memory.
This can only be done with lock(S) and is very dangerous, because
it can lead to complete deadlock. 

The sticky bit tells the kernel to not delete the copy of the text-
segment in swapspace after use. If the programm is called next time
it is much cheaper to grab the text out of swap rather than reading
the file. This is because swap is always physikal sequential on disk
while a file may be fragmented. On the other hand, the overhead for
reading out of swap is much less than reading a file. 


Greets,
	Andreas
-- 
Andreas Kessemeier	akes at mcshh.hanse.de
There is no way to Freedom. Freedom is the way.



More information about the Comp.unix.misc mailing list