logo

Crowdly

Browser

Add to Chrome

Operating Systems-Lecture,Section-3-Spring 2025

Looking for Operating Systems-Lecture,Section-3-Spring 2025 test answers and solutions? Browse our comprehensive collection of verified answers for Operating Systems-Lecture,Section-3-Spring 2025 at moodle.nu.edu.kz.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Assuming a hardware performance analysis team wants to improve a deep learning (DL) application performance on a new multi-core CPU, if the application has only a 60% parallel portion, calculate the results in theoretical speedup from 1 (single-core) to 6 (hexa-core) CPU.

View this question

In the multithreaded single-process model, choose all the information which corresponds to each thread context.

View this question

Select all the INCORRECT descriptions about the Linux scheduler.

50%
0%
50%
0%
View this question

A system uses a multi-level feedback queue scheduler with three priority levels:

Queue

Scheduling Algorithm

Time Quantum

Priority Level

Queue 0

Round Robin

4ms

Highest

Queue 1

Round Robin

8ms

Medium

Queue 2

FCFS

-

Lowest

A process enters the system and initially starts in Queue 0. Assuming no other processes enter the system, how long will it take at each level for a process requiring 22 ms of CPU time to complete execution? Write your answer below (give three numbers without units separated by commas and a space for the three levels respectively (e.g.: 1, 5, 20)).

View this question

Let's assume we have 5 processes whose arrival times and bust time is given below. Calculate the average waiting time and the average turnaround time, assuming that the Round Robin scheduling algorithm is applied with a 3ms time quantum. Draw the GANTT chart on the paper. No answer will be accepted without a GANTT chart. You won't transfer the GANTT chart to Moodle.

(Acceptable formats: 3.25, 5.00 or 13/4, 20/4. First the waiting time and second the average turnaround time. Two decimal digits, no units, values separated by a comma and a space.)

Process ID

Burst Time

Arrival time

P1

5

4

P2

3

0

P3

8

1

P4

6

9

View this question

Select the correct “Final Balance”  of the following program:

  1 #include <stdio.h>

  2 #include <pthread.h>

  3

  4 int balance = 0;

  5

  6 void* mythread(void *arg){

  7 int i;

  8 for(i=0; i<200; i++){

  9     balance++;

 10 }

 11 printf("balance is %d\n", balance);

 12 return NULL;

 13 }

 14

 15 int main(){

 16 pthread_t p1, p2, p3;

 17

 18 pthread_create(&p1, NULL, mythread, "A");

 19 pthread_join(p1, NULL);

 20 balance+=10;

 21

 22 pthread_create(&p2, NULL, mythread, "B");

 23 pthread_join(p2, NULL);

 24 balance+=20;

 25

 26 pthread_create(&p3, NULL, mythread, "C");

 27 pthread_join(p3, NULL);

 28 balance+=30;

 29

 30 printf("Final Balance is %d\n", balance);

 31

32 return 0;

 33 }

View this question

Assuming the five process states of New, Running, Waiting, Ready, and Terminated on a single processor,  choose all the INCORRECT descriptions about the process states.

0%
0%
0%
0%
0%
0%
0%
0%
View this question

Select the correct output order of the following program:

  1 #include<stdio.h>

  2 #include<unistd.h>

  3 #include<sys/wait.h>

  4

  5 int main() {

  6 int pid;

  7

  8 printf( "cat\n" );

  9 pid = fork();

 10  

 11 if ( pid == 0 ) {

 12     printf( "bird\n" );

 13     execlp( "ls", "ls", NULL );

 14     pid = fork();

 15     printf( "lizard\n" );

 16 }   

 17 else {

 18     wait(NULL);

 19     pid = fork();

 20     if ( pid == 0 )

 21         printf( "horse\n" );

 22     printf( "dog\n" );

 23 }   

 24 printf( "goat\n" );

 25 }

 

View this question

Want instant access to all verified answers on moodle.nu.edu.kz?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome