OS Lab 14 Usman.docx - Bahria University Lahore Campus Department of Computer Sciences Lab Journal 14(Fall 2018 Course Course Code Faculty\u2019s Name

OS Lab 14 Usman.docx - Bahria University Lahore Campus...

This preview shows page 1 - 3 out of 7 pages.

Bahria University, Lahore Campus Department of Computer Sciences Lab Journal 14 (Fall 2018) Course: Operating System Lab Date: Course Code: CSL - 320 Max Marks: 40 Faculty’s Name: Nighat Usman Lab Engineer: Shoaib Khan Name: Muhammad Usman Khalid Enroll No: 03-134161-024 Objective(s) : To implement Producer & Consumer Problem (Semaphore). Lab Tasks : Task 01: Write the code to implement Shortest Job First with non-preemptive. Task 02: Write the code to implement Shortest Job First with preemptive Lab Grading Sheet : Task Max Mark s Obtained Marks Comments( if any ) 1. 10 2. 10 3. 10 4. 10 Total 40 Signature Note : Attempt all tasks and get them checked by your Lab. Instructor
Image of page 1
Lab Manual Operating System | CSL-320 Task 1 : Code: #include<iostream> using namespace std; struct process { int id,wait,ser,tottime; } p1[20]; struct process tmp; int main() { int i,n1,j; float totalwait=0,totalser=0,totaltime=0; float avgwait; cout<<"enter total number of process u want to enter!"; cin>>n1; for(i=0;i<n1;i++) { cout<<"Enter the process id "; cin>>p1[i].id; cout<<"Enter the service time "; cin>>p1[i].ser; } Department of Computer Science, BULC
Image of page 2
Image of page 3

You've reached the end of your free preview.

Want to read all 7 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture