Find Jobs
Hire Freelancers

OS_software

$10-30 CAD

Cerrado
Publicado hace alrededor de 9 años

$10-30 CAD

Pagado a la entrega
CPU Scheduler is a key component of any multiprogramming operating system (OS) kernel. It is very important to understand all details about the CPU scheduler if you want to know dynamic behaviors of an operating system. In this project, you are asked to write some C programs to simulate the following three CPU scheduling algorithms for a multi-core computing system consisting of four (4) homogeneous CPU’s: (a) FCFS (first-coming-first-serving) scheduling. (b) RR (round robin) scheduling with time quantum q=2 milliseconds, q=12 milliseconds, q=50 milliseconds, respectively. (c) Three-level feedback-queue (FBQ) preemptive scheduling with q1=10 milliseconds and q2=30 milliseconds, as shown in Figure 6.7 in the textbook. Read the corresponding text for details about this scheduling algorithm. Based on a given static CPU workload , your program must calculate and answer all the following questions for each of the above CPU schedulers: What is the average waiting time? What is the average turnaround time? When does the CPU finish all these processes? What is average CPU utilization by this time point? (At any time instance, CPU utilization is 400% if all 4 CPUs are running, 300% if only 3 CPUs are running, 200% for 2 CPUs, 100% for only 1 CPU, 0% if no CPU is running.) How many context switches occur in total during the execution? (How to count context switch for this question: you should count as context switch only for those cases where a process is preempted during its CPU bursts, not for those cases where a process terminates or just finishes its current CPU bursts and goes to I/O.) Which process is the last one to finish? In this project, you need to write three C programs to implement the above CPU schedulers. For FCFS scheduler, your program is called "fcfs.c". For RR scheduler, your program is called "rr.c". For FBQ scheduler, your program is called “fbq.c”. When the programs run, they should print out the answers to all of the above questions to the standard output. In this project, you are provided with some helper functions, which includes C functions to load data from a CPU load file, to sort processes, to do linked-list based scheduling queue implementation. You can download them (sch-helpers.c and sch-helpers.h) and directly use them in your code. Please read closely the hints at the beginning of sch-helpers.c for how to use these helper functions. You are free to make any modifications to these two files to fit your need. Data Format The CPU workload data file can be downloaded from the course Web, which is an ASCII file made in Unix system. Each line represents one process with the following format: (all numbers are in unit of millisecond) pid arrival_time 1st_CPU_burst (1st_IO_burst) 2nd_CPU_burst (2nd_IO_burst) ... e.g. 0 0 4 (100) 12 (67) 2 ... 1 13 7 (210) 20 (23) 67 ... where each I/O burst includes both the time waiting in the device queue and the time spent in actual I/O operations. When you implement each scheduler, if two or more processes are identical in terms of scheduling criterion, you should give priority to a process that has the lowest pid number. What to submit? fcfs.c ssch-helpers.c sch-helpers.h And your code should run like: fcfs < [login to view URL] After the first deadline, a sample code of FCFS scheduler will be posted online for you to debug your code and learn how to write a good C program. Then you will continue to finish the remaining schedulers by the second deadline. Part II submit 3221 project2 rr.c submit 3221 project2 fbq.c submit 3221 project2 sch-helpers.c submit 3221 project2 sch-helpers.h Both rr.c and fbq.c should compile and run in the same way as fcfs.c. gcc –Wall –o rr rr.c sch-helpers.c gcc –Wall –o fbq fbq.c sch-helpers.c And rr and fbq should take a time slice as command-line argument and run as follows: rr 2 < [login to view URL] rr 12 < [login to view URL] rr 50 < [login to view URL] fbq 10 30 < [login to view URL]
ID del proyecto: 7158888

Información sobre el proyecto

3 propuestas
Proyecto remoto
Activo hace 9 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
3 freelancers están ofertando un promedio de $60 CAD por este trabajo
Avatar del usuario
Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!Read y!
$100 CAD en 1 día
5,0 (38 comentarios)
5,4
5,4
Avatar del usuario
A proposal has not yet been provided
$25 CAD en 1 día
5,0 (13 comentarios)
4,2
4,2
Avatar del usuario
Hi, I could do this for you. maybe we coud chat furthor THX.
$56 CAD en 2 días
5,0 (1 comentario)
1,0
1,0

Sobre este cliente

Bandera de CANADA
Toronto, Canada
5,0
5
Forma de pago verificada
Miembro desde jul 7, 2014

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.