Living in the residence halls can get very overwhelming. At this time you are trying to get all your class work done. My advice for you would to have a plan with your roommate. Ask him or her if you can get an hour or two to study or be alone. If you need time alone and they are doing something in the room I would suggest going to the library. There are many places in the library that you can go to get away from people. Even if there isn’t a place to be alone the people there should be doing work.
Your roommate won’t be your only distraction that is just one part. If your working on the computer you might be tempted to check social media while doing your homework. There is a way to block website on macs when you are trying to get your work done. Another distraction can be your phones. If you have an iPhone I would put it on do not disturb. It is a good way to block yourself from any distractions. I would make sure you give yourself breaks but not for too long. It’s good to give yourself time to relax while trying to get work done. Trying to get alone time is a struggle but trying to stay focused when you are alone is even more of a problem.