personally i'd probably prefer an os unless i was trying to learn device programming specifically. if you're playing with things like scheduler policies, vm strategies or networking, you probably want the all of the tooling that is available on full blown multiprocessing operating systems to generate/simulate workloads and test your strategies under real world conditions.
if you're aiming to be an embedded person someday on things like scada and such, or are interested in reverse engineering old hardware and systems and care a lot about device interfaces, them maybe one of these operating system as library frameworks would be a better choice.
depends what your goals are i guess.