How to deal with uninterested students during an optional exercise session?

Do you prefer more or less authoritarian style?

More authoritarian: "If you come to my class, I assume you wish to be taught by me and respect my time. In other words, you are to work on your assignments. If you do wish to watch videos or to Facebook, that is fine, but please do not do that in my class - it is disrespectful to me and in fact also to your fellow students who come here to learn. Feel free to leave to watch, and to come back when you are done and wish to return to the exercises."

More liberal: "It is everyone's own responsibility to learn and I will help you to understand the material and how to master it. If you do not wish to engage in it, that is your free decision, but you need to be aware that this is your own responsibility to engage with the material in order to benefit from it [and pass the exam]." - say it once at the beginning, and then perhaps one more time in the middle of the semester. That's it.

Modify as required, this is just a coarse line of action, YMMV.

You certainly seem to be engaged in your lecture, which is good. The thing is, though, that the distribution of student types you describe is very normal. The way lecturers handle unattentive students will differ culturally. At least here in Germany, as a student you are expected to be self-independent. If you do not pay attention, nobody will fight for your attention, as long as you do not disturb the lesson.

In this special case, you have two options:

  1. Continue trying to reach him and give him extra attention.
  2. Ignore him and let him decide for himself how much he wants to engage.

What is important for you is, that you do not take such behaviour personally. Sometimes people just come to university out of habit and then they'll surf on their phones or whatever. It is their responsibility to study for their exams, not yours to force-feed them knowledge.

The answers by Captain Emacs and ian_itor are good. I want to add that you should ask your coordinator/managing professor about this, because the scope of what's acceptable on your part will vary by culture and institution.

Perhaps some professors will say, "Just tell them to leave." Other institutions may highly encourage or require proof of regular attendance for funding or legal purposes, and therefore culturally prohibit telling students not to come to class in any event.

When my father was at any Ivy professional school in the 1960's, one professor could reputedly grab a distracted student without warning by the shirt collar, physically throw him out of the room, and lock the door on him. Surely that's not allowed anywhere anymore.