Ta có: $1=a^2+b^2\ge2ab \Rightarrow ab\le\dfrac{1}{2}$.
$S=4+a+b+\dfrac{2}{a}+\dfrac{2}{b}+\dfrac{a}{b}+\dfrac{b}{a}$
$=4+a+\dfrac{1}{2a}+b+\dfrac{1}{2b}+\dfrac{a}{b}+\dfrac{b}{a}+\dfrac{3}{2a}+\dfrac{3}{2b}$
$\ge4+2\sqrt{a.\dfrac{1}{2a}}+2\sqrt{b.\dfrac{1}{2b}}+2\sqrt{\dfrac{a}{b}.\dfrac{b}{a}}+2\sqrt{\dfrac{3}{2a}.\dfrac{3}{2b}}$
$=4+\dfrac{2}{\sqrt2}+\dfrac{2}{\sqrt2}+2+\dfrac{3}{\sqrt{ab}}$
$\ge6+2\sqrt2+\dfrac{3}{\sqrt{\dfrac{1}{2}}}=6+5\sqrt2$
$\min S=6+5\sqrt2 \Leftrightarrow a=b=\dfrac{1}{\sqrt2}$