Home

About Me

Academics

Courses

White Space

Quotes

Links

Guest Book

Photo Album

Contact Me

Collections

Friends

Work Related to Operating Systems

Assignment No. 1
(1) Implement a suitable mechanism to do checkpointing of a program at user level. That is, stop a program at one m/c, transfer the program to another m/c having the same CPU, and running the same OS, and then execute the program at the new m/c starting from the most recent checkpoint taken in the last m/c. You must not use any existing library, and write all the necessary code from scratch.

(2) Implement a user-friendly controller to perform the above operation.
Assignment No. 2
Program 1: Write a C program for a linux OS running in Pentium that performs the following. The program has two functions, say A and B. Initially, A is called , and it prints that the program is in function A for the first time. Then B is called, and it prints the same info. Then you should toggle between function A and B repeatedly without using function call, ecah time printing that you are in the function A or B for the nth time. You may sleep for appropriate duration after each printing so that the output is clearly visible.

Hint: Use assembly language statement using asm statement. For more help, see the following.
(i) The macro switch_to in the file /usr/src/linux/include/asm/system.h
(ii) The function __switch_to in the file /usr/src/linux/arch/i386/kernel/process.c

Program 2: Generalize the above program for n functions. That is, A goes to B, B goes to C, C goes to D, and then D goes to A, and the cycle repeats.
Assignment No.: 3
Program 1: Give an implementation of Semaphore for a multiprocessor system using BUSY waiting that can be accessed from the threads of the same program. Use this semaphore for implementing monitor. Use this monitor to write a program for bounded-buffer problem in which there are p producers and q consumers. Each producer or consumer should be in infinite loop, and sleeps sifficiently so that it gives a display in the terminal which can be viewed properly.

Program 2: The same problem except that it is NON-BUSY waiting for semaphore now. Real-time signal may be necessary here. But you can also implement using just ordinary signals.
Hint: Use asm statement to use assembly language statement test-and-set or equivalent instruction.

Assignment No.: 4
Problem: Write a program to simulate the kernel of an OS in which there are only kernel threads, and no processes. The kernel of the OS is to be simulated in the address space of a process. Input to the program are as follows.

1. A periodic 10 ms signal to invoke the scheduler of the kernel.

2. A user interface thread to create new periodic threads with a period which is a multiple of 10 ms. The periodic thread should execute for certain duration which is less than the period. At the time of creation, the priority of the thread is also specified. The threads are to be created from the already existing functions in the program. When a thread finishes execution, it waits to be scheduled for execution at the beginning of next interval, but the scheduler is invoked to schedule the next thread.

3. The user interface should also allow to destroy threads.
4. The interface should also display information about existing threads.

The scheduler has to implement preemptive priority scheduling with round-robin scheduling for each priority level. The time quanta for the entire system is fixed, which is again a multiple of 10 ms. You may use some useful application programs for each application thread.

Term Paper
Paper on " Scheduling Algorithms in NEUTRINO Operating Sysytems

Back To Course Page
Yesterday is History; Tomorrow is a Mystery; Today is a GIFT.