4. Given real numbers $x, y$ satisfy $x^{2}+y^{2}=1$. Let the maximum and minimum values of $x^{4}+$ $x y+y^{4}$ be $S_{\text {max }}$ and $S_{\text {min }}$, respectively. Then $S_{\text {max }}+S_{\text {min }}=(\quad$.
(A) $-\frac{1}{8}$
(B) 0
(C) 1
(D) $\frac{9}{8}$
4. D.

Notice,
$$
\begin{array}{l}
(x-y)^{2}=x^{2}-2 x y+y^{2} \geqslant 0 \\
\Rightarrow 2|x y| \leqslant x^{2}+y^{2}=1 \\
\Rightarrow-\frac{1}{2} \leqslant x y \leqslant \frac{1}{2} . \\
\text { Let } S=x^{4}+x y+y^{4} \text {. Then } \\
S=\left(x^{2}+y^{2}\right)^{2}-2 x^{2} y^{2}+x y \\
=-2 x^{2} y^{2}+x y+1 \\
=-2\left(x y-\frac{1}{4}\right)^{2}+\frac{9}{8} .
\end{array}
$$

By the monotonicity of the function:
When $x y=\frac{1}{4}$, $S_{\text {max }}=\frac{9}{8}$;
When $x y=-\frac{1}{2}$, $S_{\text {min }}=0$.
Therefore, $S_{\text {max }}+S_{\text {min }}=\frac{9}{8}$.