Showing posts with label Operating Systems. Show all posts
Showing posts with label Operating Systems. Show all posts

Saturday, August 13, 2011

Operating Systems - A Fun

August 13, 2011
I read “operating systems” during my academics, and fortunately got an opportunity to work on a commercial OS development for embedded systems. The following list of resources will help to understand the OS internals,
1. Minix – the foundation behind Linux implementation. The source code is available from the book Operating Systems Design and Implementation, 3e, by Tanenbaum and Woodhull.
2. Micro C OS - II and Micro C OS – III. If you want simple OS implementation for embedded system, it is the book for you. The recent updated kernel (µCOS - III) supports virtual memory management. Code is free for educational purpose, get from “http://micrium.com/page/home”. The story behind Micro C OS is interesting, an example of what passion and need can do, read the story in the book, the same was available on their website.
3. eCos is another RTOS written in C++. However, it seems it is now defunct.
4. RTEMS – The first (IMHO) open source kernel implementing rate monotonic scheduling. Written in C++.
5. pintos – created by a Stanford student, available for free. Check their website.
The above links help to navigate real code. But for the concepts behind the code, we need to consult relevant books or papers.
For example, read this paper for Linux O(1) scheduler implementation, you need to be aware of priority arrays, complexity basics, etc. Similarly, for practical use of linked lists in Linux read Robert Love book.

Monday, April 11, 2011

Differences between Semaphores and Mutexes

11, Apr 2011
What are the differences between semaphores and mutexes?. Are binary semaphore and mutex same or just a notational convenience?
It is typical interview question. Surprisingly, we get correct answers rare.
From my learnings during RTOS design, I am preparing an article for Geeksforgeeks (link), it will be published soon.
An interesting question, if you observe Windows word 2003, Adobe PDF reader, only one instance will be running in the task manager. Where as Windows Excel 2003 will create as many processes as number of excel documents opened. How to implement, only one instance of process must be running, invoking another instance should prompt "An instance is already running" message?