Grade or middle school, really. "Clever highschoolers" are writing their own bare-metal OSes these days.
And yes, I did write one. It totally sucked, but it did work, mostly.
Perhaps you are even right since advanced Arduino programming (which many "Clever highschoolers" should be able to do) is in some sense like writing a really simple RTOS. :-)