A Tulsa County judge has sentenced a man to 30 years in prison for shooting and killing his roommate nearly two years ago.