Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS370: System Architecture and Software - Fall, 2009 Course Materials, Assignments of Computer Science

Questions and exercises from the cs370: system architecture and software course text (8th edition) for the fall, 2009 semester. The questions cover topics such as process creation, thread state, scheduling criteria, and scheduling algorithms. Students are expected to solve problems related to these topics for assessment.

Typology: Assignments

Pre 2010

Uploaded on 11/08/2009

koofers-user-6ov
koofers-user-6ov 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download CS370: System Architecture and Software - Fall, 2009 Course Materials and more Assignments Computer Science in PDF only on Docsity! CS370: System Architecture and Software Fall, 2009 Due: Tuesday, September 29, 2009 From the course text (8th edition): 1. 3.9 Including the initial parent process, how many processes are cretaed by the program below? #include <stdio.h> #include <unistd.h> int main() { fork(); /* fork a child process */ fork(); /* fork another child process */ fork(); /* and another child process */ return(0); } 2. 4.10 Which of the followoing components of program state are shared across threads in a multithreaded process? (a) Register values (b) Heap memory (c) Global variables (d) Stack memory 3. 5.10 Discuss how the following pairs of scheduling criteria conflict in certain settings: (a) CPU utilization and response time (b) Average turnaround time and maximum waiting time (c) I/O device utilization and CPU utilization 4. 5.12. Consider the following set of processes, with the length of the CPU burst given in milliseconds: Process Burst Time P1 10 P2 1 P3 2 P4 1 P5 5 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, and all at time 0. • Draw four Gantt charts that illustrate the execution of these processes using the following schedul- ing algorithms: FCFS, SJF, nonpreemptive priority (a small priority number implies a higher priority), and RR (quantum = 1). • What is the turnaround time of each process for each of the scheduling algorithms in part 1? • What is the waiting time of each process for each of the scheduling algorithms in part 1? • Which of the algorithms in part 1 results in the minimum average waiting time (over all processes)? 5. 5.13 Which of the following scheduling algorithms could result in starvation: FCFS, SJF, RR, Priority? Explain
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved