0% found this document useful (0 votes)
13 views4 pages

Operating Systems Lab Assignments - Problem Statements

Uploaded by

lynx2458
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views4 pages

Operating Systems Lab Assignments - Problem Statements

Uploaded by

lynx2458
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Operating Systems Lab

List of Programs

Problem Problem Statement Date of


Statement Execution

1 Write a BASH shell script for the following problem statements

1.1 In an organization, an employee is hired on a Basic Salary of 20,000 Rs,


with DA of 40% of Basic Salary, HRA of 10% of Basic Salary, and TA
of 2000 Rs per month. There is a deduction of 2% of Basic Salary for
retirement and life insurance benefits. The employee is also given a one-
time payment of 75,000 Rs. for the purchase of the furniture and 45,000
Rs for the purchase of a laptop. Write a BASH shell script to calculate and
display the Net Salary of the employee. Also, display the total amount
credited (in the first month) to the account of the employee.

1.2 Write a BASH shell script to calculate final velocity (v) of an object,
where an initial velocity (u), acceleration (a) and time duration (t) is given
as an input. The formula that will be used is v = u + a*t.

1.3 Write a BASH shell script to check that a number that is taken as input is
an even number or odd number.

1.4 Write a BASH shell script to check that a number that is taken as input is
divisible by 3 or not

1.5 Write a BASH shell script to find the factorial of a given number.

1.6 Write a BASH shell script to check that the given number is prime or not.
1.7 Write a BASH shell script to display all prime numbers in between 1 to
N. The value of N is taken as input from the user.

1.8 Write a BASH shell script to find and display the sum of the following
series (The value of N is taken as input from the user)
1 + 2! + 3! + 4! + 5! + 6! + … + N!

1.9 Write a BASH shell script to count and display numbers of files and
directory present in the current directory.

1.10 Write a BASH shell script to copy files only from the current directory to
another directory. The name of the destination directory is to be taken as
an input.

1.11 Write a BASH shell script to find largest and smallest elements of a given
array.

1.12 Write a BASH shell script to find sum of all elements of a given array.

2 Prepare and verify an employee database file (EMPLOYEE) that contains


at least 30 employee records under the following columns/fields.
EMP Id, EMP First_Name, EMP Last_Name, Location, Designation,
Net Salary, Specialization, Project, Joining Month, Joining_Year.

Sample Record:
101 Raj Kumar Delhi Manager 60000 Data_Analytics ERP

2.1 Create and execute AWK script to display EMP Id, Name, location, and
Designation of employees having designations as ‘Manager’.

2.2 Create and execute AWK script to display EMP Id, Name, specialization,
and location of employees who are specialized in Java Programming and
are working at Delhi or Pune locations.

2.3 Create and execute AWK script to display EMP Id, Name, location,
Designation, and Joining Month, Joining_Year of all those employees
who joined after Jan 2000 but before December 2005.

2.4 Create and execute AWK script to display all fields of all those employees
who joined the organization on the net salary in between 45000-65000,
during the period Jan 2000 to December 2005.

2.5 Create and execute AWK script to display all fields of the employee
getting the highest salary at the Delhi location.

3 Write a ‘C’ program using ‘gcc’ compiler to extract system information.


Model name, Cache Size, Number of CPU cores, CPU clock speed, Total
Memory, Free Memory, OS Name, OS Version.

4 Write a ‘C’ program using ‘gcc’ compiler to extract PID of parent and
child processes. Child process is to be created using fork() system call.

5 Write and execute a C program to implement FCFS CPU Scheduling


Algorithm.

6 Write and execute a C program to implement SJF CPU Scheduling


Algorithm.

7 Write and execute a C program to implement FCFS Page replacement


Algorithm.

8 Write and execute a C program to implement LRU Page Replacement


Algorithm.

9 Write and execute a C program to implement SSTF Disk Scheduling


Algorithm.

10 Write and execute a C program to implement SCAN Disk Scheduling


Algorithm.

You might also like