You are on page 1of 3

OPERATING SYSTEM LAB IN LINUX

(USING C)

LAB CYCLE SHEET


Basic exercises (SHELL PROGRAMMING)

1. Write a program to display the current working directory. 2. Write a program to find greatest of three numbers. 3. Write a program to check for login and password. 4. Write a program to check for amstrong number. 5. Write a program to sort the given file. 6. Write a program to display the following 1. DATE 2. No of Files 3. No of Users Currently Logged On 4. Open VI Editor

7. Write a menu driven program to perform the following file operations 1. Create a file 2. Rename a file 3. Delete a file 4. Copy a file 5. List the content of the file. 8. Write a menu driven program for banking system. Menu includes 1. creation of account 2. transaction 3. display the account details

9. Write program to display the clock 10. Write a program to check for the given user whether he has logged

in or not display all the users who ever logged in more than once. CYCLE - I (C PROGRAMMING)

1. Write a program to create parent, child process and print their id. 2. a) Write a program to create a zombie process. b) Write a program to create orphan process.

3. a) Write a program to make the process to sleep for few seconds. b) Write a program to create a background process. 4. a) Write a program to get the CPU type, model and kernel version. b) Write a program to get the amount of memory configured into the computer, amount of memory currently available. 5. Write a program to pass messages between pipes.

CYCLE II (C PROGRAMMING)

(THREADS) 1. a) Write a program to create threads. b) Write a program to communicate between threads.

(PROCESS SCHEDULING) 2. Write a program to perform scheduling of the processes by the following algorithms 1. FCFS 2. SJF 3. PRORITY 4. ROUND ROBIN

(INTER PROCESS COMMUNICATION) 3. Write a program to communicate between process through shared memory 4. Write a program to perform inter process communication through signal (PROCESS SYNCHRONIZATION) 5. Write a program for process synchronization 6. Write a program to create semaphore for synchronizing the processes 7. Write a program to provide a solution for reader- writer problem through process synchronization 8. Write a program to provide a solution for Dining philospher problem (DEADLOCK) 9. Write a program to detect the deadlock and avoid deadlock through Bankers algorithm. (MEMORY MANAGEMENT) 10. Write a program to allocate memory by appling the following

statergies.

1. FIRST FIT 2. BEST FIT 3. WORST FIT

You might also like