You are on page 1of 1

OS LAB OpenMp & Signal Handling

Lab#12 TASKS
Signal Handling:
1. Write a program that handles five alarm signals iteratively. At the start of the
program it prints “Starting the Alarm”. On the first signal alarm waits for one
seconds and it creates five threads, each thread prints “Hello World! It’s me,
thread no 1-5”. On second signals it waits for 2 seconds it creates five
threads, each thread prints “Hello World! It’s me, thread no 1-5”, and so on
till It completes five signals.
2. Write a program that handles (signal_handler, SIGTSTP). Its saves the
counter variable against each signal received. E.g., on first signal it creates 1
thread, on second signal it creates 2 threads, on third signal
it creates 3 threads and so on. When signal is received, program prints
which kind of signal it was. After 5th signal. Threads joined and program
terminated.
3. Perform all the programs of lab manual of signal handling.

OpenMp:
4. A bank has four counters to give its services to customers.
- Counter 1 is used for Cash Withdrawals
- Counter 2 is used for Deposits
- Counter 3 is used for submitting Challans
- Counter 4 is used for Bank Inquiry
Implement this system using OpenMP for a total 100 customers. Assuming
25 customers for each counter.
5. Online web server of an airline agency has four ports providing different
services to visitors.
- Port 1 is used for showing the list of Fights.
- Port 2 is used for generating Tickets.
- Port 3 is used for cancelling fight.
- Port 4 is used for fare inquire w.r.t place, time and days.
Implement this system using OpenMP for a total 80 visitors’ traffic.
6. Perform all the programs of lab manual of OpenMp.

1|Page

You might also like