Near threshold operation of semiconductor lasers and resonant-type laser amplifiers