Objects are achieved by an optical semiconductor device comprising: a
structure 61 including a substrate 50, a diffraction grating 52a, an
active layer 54 and a refractive index control layer 60; and an laser
element 100 including an electrode 92a for the active layer, an electrode
92b for the refractive index control layer and an electrode 92c for
switching, wherein a pre-bias current is previously supplied from the
electrode 92a for the active layer to the active layer 54 in a state
where a switching current is not supplied from the electrode 92c for
switching to the active layer 54, and then while a current I.sub.drive
for activation is supplied from the electrode 92a for the active layer to
the active layer 54, the laser element 100 is turned on by supplying the
switching current I.sub.sw from the electrode 92c for switching to a part
of the active layer 54, as well as turning off the laser element 100 by
halting the supply of the switching current I.sub.sw.