Mr. Ravi, 20, was not charged with causing Mr. Clementi’s death, but the suicide hung heavily over the trial, and over the sentencing on Monday. Mr. Clementi’s mother, father and brother spoke before the judge delivered his decision, breaking down occasionally as they recalled his accomplishment and his promise, and the pain of losing him and of reliving the agony of his final days as they endured three weeks of courtroom testimony.

“I cannot imagine the level of rejection, isolation and disdain he must have felt from his peers,” Tyler’s brother James Clementi said. “Dharun never bothered to care about the harm he was doing to my brother’s heart and mind. My family has never heard an apology, an acknowledgment of any wrongdoing.”

His mother, Jane Clementi, also criticized students who knew about the spying from Mr. Ravi’s Twitter feeds. “How could they all go along with such meanness?” she said. “Why didn’t any one of them speak up and try to stop it?”

Judge Berman said he wanted to impose a sentence that was “constructive” and would provide a measure of closure — “though I don’t know how the Clementis will ever get closure,” he said. He said he imposed the jail time for witness and evidence tampering and for lying to the police. But for the bias intimidation convictions, he gave Mr. Ravi three years’ probation.

The judge did not explicitly say why he deviated so far from the maximum sentence. But he said he believed the State Legislature had intended prison time to be attached to crimes of violence, and there had been none.

Mr. Ravi’s lead lawyer, Steven Altman, had earlier read from a presentencing memo by a corrections officer who had interviewed Mr. Ravi and recommended against incarceration.