Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Computer Science Department

Faculty of Computers and Information Sciences


Mansoura University

Operating System 1

(Lab Manual)

1
2019-2020

Lab1
Lab Objectives:
• The student should know how to set up the virtual box with the appropriate configurations.
• The student should know to set up the required operating system inside the created virtual
machine (Ubunto).

Lab2
Lab Objectives:
• The student should know how to study and execute a set of Unix commands including:
(date, cal, echo, banner, who, who am I, tty, clear, man, tput, ls ).

Lab3
Lab Objectives:
• The student should know how to study and execute a set of Unix (directory related and file
related) commands including: (pwd, mkdir, cd, rmdir, cat, sort, cp, mv, rm, wc, lp, pg).

Lab4
Lab Objectives:

• The student should understand the process or CPU scheduling (FCFS, SJF, RR, and Priority).
• The student should able to solve a variety of problems that emphasize and clarify the
aforementioned concept.
Lab5
Lab Objectives:
• The student should know how to study and execute a set of Unix (Filters and Pipes)
commands including: (head, tail, ls, more, grep, sort,|, tr).

2
Lab6
Lab Objectives:

• The student should understand the concept of contiguous allocation.


• The student should able to solve a variety of problems that emphasize and clarify the
aforementioned concept.

Lab7

Lab Objectives:
• The student should understand the concept of paging memory management scheme.
• The student should understand the concept of segmentation memory management
scheme.
• The student should able to solve a variety of problems that emphasize and clarify the
aforementioned concept.

Lab8

Lab Objectives (Programming Problems):


• Problem 1:
Assume that a system has a 32-bit virtual address with a 4-KB page size. Write a C
program that is passed a virtual address (in decimal) on the command line and have it
output the page number and offset for the given address. As an example, your
program would run as follows:
./addresses 19986
Your program would output:
The address 19986 contains:
page number = 4
offset = 3602
Writing this program will require using the appropriate data type to store 32 bits. We
encourage you to use unsigned data types as well.

3
• Problem 2:
Assume that a system that adopts the paging memory management scheme. Write a C
program that is passed the frame and process sizes on the command line and have it
output the amount of internal fragmentation.

Lab9

Lab Objectives (Programming Problems):


• Problem 1:
Write a program that implements the FIFO, LRU, and optimal (OPT) page-replacement
algorithms. Have your program initially generate a random page-reference string
where page numbers range from 0 to 9. Apply the random page-reference string to
each algorithm and record the number of page faults incurred by each algorithm. Pass
the number of page frames to the program at startup. You may implement this
program in any programming language of your choice.

Lab10

Lab Objectives:
• The student should understand the concept of disk scheduling.
• The student should able to solve a variety of problems that emphasize and clarify the
aforementioned concept.

Lab11

Lab Objectives (Programming Problems):


• Problem 1:
Write a program that implements the FCFS, SCAN, and SSTF disk scheduling algorithm.
Have your program initially generate a random queue of requests string where
cylinders numbers range from 0 to 999. Apply the queue of requests to each disk
scheduling algorithm and record the total head movement incurred by each algorithm.
Pass the initial head position (an integer value between 0 and 999) to the program at
startup.

You might also like