Mechanism of pressure induced semiconductor-metal transition in SmS