I agree. Forget him until this exam is over. Turn off your phone, go to the library or computer lab at school, and focus on the exam. Don't mess up YOUR business because he can't handle his.
As far as boundaries go, you have to figure out where YOU stand. Boundaries are your limits. They're what you will or will not tolerate personally. It's all about controlling your behavior here, not his. He doesn't get a say in your boundaries, he can just choose to respect them or not. So you have to decide what your deal breakers are, what kinds of treatment you can and cannot tolerate, and how you're willing to live.
First, figure out your breaking points. Your hard lines, your dealbreakers... whatever. Those are the "if he does X, I will leave" boundaries. For example, my hard boundaries are cheating, physical abuse, serious substance abuse, and being cruel to my children. Those are "Bye, Bitch" offenses, and I won't change my mind about that.
Next figure out your tolerance levels for less serious behaviors. These are the "X is not acceptable behavior that I am willing to tolerate or am willing to deal with long term. If he continues to do X without trying to correct his behavior, I may have to leave" boundaries. Lashing out verbally, how long your willing to stay in a relationship if he isolates from you, how much you can deal with suicidal ideation, if you can handle it if he continues to refuse treatment... these aren't necessarily "leave immediately" offenses, but they could turn into it if there is a pattern of behavior. An example is isolation... if my partner ever isolates for longer than a few weeks with no contact, I cannot be in a relationship with him. That's not a relationship in my opinion. He can go isolate as long as he wants, but I'm not going to sit here and wonder if I'm single for a month at a time.
Then there's normal relationship expectation boundaries. Like if you can tolerate a clingy partner, or a lazy partner who doesn't help... you get the ideas. "I am not a maid, if he does not pick up his socks, then he's going to have crusty ass dirty socks to wear, because I'm not washing them."
Really the whole thing boils down to this... mean what you say, and say what you mean. If you have no follow through, a boundary is useless.