Is the setting OFF/ON of the security flag different from enabling/disabling of fastboot? I am following the book XDA Developers Android Hackers Toolkit 2012.
 In the beginning chapters , it says that :
The second-stage bootloader checks to see if the security flag is on (S-ON) or off (S-OFF) and depending on that , it checks for the signatures in kernel and OS that is to be loaded . The book says that if the security flag is S-OFF , then the bootloader no longer checks for signatures and also makes the entire system writable .
Now , coming to fastboot :
Fastboot is a protocol that allows low level commands to be sent to a device to do such things as write files to the OS . Most manufacturers , therefore , disable the fastboot protocol at the factory .  

Can the security flag be S-OFF and fastboot be disabled ? Can anyone elaborate on the relation between the security flag and fastboot protocol ?
S-OFF is mainly found in HTC devices, and is a separate security mechanism whereas the /system directory cannot be mounted RW across boots.

It also restricts other features.

If S-OFF is enabled, fastboot can't be disabled, as fastboot would have to be enabled to turn S off. As such, fastboot would most likely be enabled, unless it was re-locked in some way (which would in turn lock S to ON).