optimization bytesbuffer
fixed bug can not termination process under unix
implementation of mutex unix code