Hi Erodeboy,
Actually "Micro C OS -II" is a book that explans all about writing your own rtos by disection & explaing through source code written by the author. Unfortunately this book is not for free. If you are looking out for free tools or links to such tools I guess you might have to search the site a bit. If you are looking out for OS concepts on the whole download UNIX- Internals by Vahia.