TITLE: About devil's staircases
QUESTION [9 upvotes]: We say that a function $f:\left[a,b\right] \to \mathbb{R}$ is a singular function or a devil's staircase if $f$ satisfies the following properties: 

$f$ is continuous;
$f(a) < f(b)$;
$f$ is non-decreasing on $\left[a,b\right]$;
There exists a set $N \subset \left[a,b\right]$ (named exceptional set) of Lebesgue measure $0$ such that for all $x \in \left[a,b\right] \setminus N$ the derivative of $f$ in $x$ exists and is zero.

Possibly, the most know example is the devil's staircase constructed such that the ternary Cantor set is its exceptional set. (http://math.mit.edu/~katrin/teach/18.100/Devil%27s-Staircase.pdf). In this case, the exceptional set satisfies that $\dim_H(\mathcal{E}) = 0$. There are also examples where the exceptional set has $\dim_H(\mathcal{E}) = 1$ (M. Urbanski, On the Hausdorff dimension of invariant sets for expanding maps of a circle. Ergodic Theory Dynam. Systems 6(2):295-309, 1986.)

Is it possible to construct a devil's staircase such that the exceptional set is countable?
Is it possible to construct a devil's staircase such that the exceptional set is uncountable and $\dim_H(\mathcal{E}) = 0$?
Are there any examples of similar functions to the devil's staircase such that the exceptional set is a Cantor set with positive Lebesgue measure?

REPLY [4 votes]: From the comments by Pietro Majer.
For question 1: No, a continuous function on $[a,b]$ such that any of its Dini derivatives is nonnegative up to a countable exceptional set is increasing (see Dieudonné).
For questions 2, 3, or similar requirements on the shape of the exceptional set: recall that composing Cantor's function $f\colon[0,1]\to\mathbb{R}$ with an increasing homeomorphism $\phi\colon[a,b]\to[0,1]$ you get a devil's staircase $f\circ \phi$ with exceptional set $N=\phi^{-1}(N)$.