Genesis of pulsars in globular clusters