It both helps and hurts that British filmmaker David Mackenzie’s riveting prison drama was written by Jonathan Asser, a prison therapist. On the one hand, the story feels directly spun from the experience of someone who knows what it’s like on the inside, and why. On the other hand, that knowledge alone does not complete the skill set of a dramatist. The raw material of Starred Up is brutal, enraging, heartbreaking, and agilely managed by Mackenzie, but the movie can’t seem to help lapsing into contrivance, cliché, and awkward melodrama. In an outstanding star turn likely to be discussed for years, Jack O’Connell plays a horrendously violent 19-year-old newly transferred to the adult prison where his steely father, played by Ben Mendelsohn, also is an inmate. Inhumanity ensues, with cycles of violence both generational and institutional. If we’re discussing bad apples and the trees they fall from, Asser’s script seems to say, let’s talk about a so-called corrections system run by sadists. Better to talk, anyway, than to go on perpetuating and glorifying aggression. Asser’s proxy of sorts is a group anger management therapist played by Rupert Friend, in another of this film’s several great performances. Mackenzie supports his screenwriter’s humanitarian intentions by bringing out his actors’ best, so it’s forgivable that Starred Up is shaped less like a drama than an intense therapy session — full of urgency and raw vitality, tempered with coached epiphanies, and eventually reined in by an impermanent, we-have-to-end-it-here closure. Its astute final image is the cold metal maw of a revolving door.