The commissioner of corrections may offer suitable encouragement and indulgences to those convicts who distinguish themselves by obedience, industry, and faithfulness, and may punish any convict guilty of insolence or ill language to any officer of the prisons or guilty of obstinate and refractory behavior by solitary imprisonment not more than 30 days at one time or by such other reasonable and effective modes of punishment and discipline as the commissioner of corrections may from time to time prescribe.