Homework 2: Threads, Scheduling

 


1. (10pts) Threads: What is the difference between a process and a thread. Which one consumes more resources?

2. (5pts) Threads: Assume that the OS implements Many-to-Many multithreading model. What is the minimum number of kernel threads required to achieve better concurrency than in the Many-to-One model? Why?

3. (10pts) Threads: What is the relation between Solaris user threads and Java application threads in a Solaris environment?

4. (20pts) Java Threads:

Develop an execution driven simulator for a multiprocessor that solves a 3x3 matrix multiply (i.e., AxB=C, where A,B,C are 3x3 matrixes) following these steps:

5. (10pts) Scheduling: Given the following mix of job, job lengths, and arrival times, assume a time slice of 10 and compute the completion and average response time of each job for the FIFO, RR, and SRTF algorithms. Use the following format for the solution:

Parameters Scheduling Algorithms
Job length arrival time FIFO RR SRTF
0 75 0      
1 40 10      
2 25 10      
3 20 80      
4 45 85      
    Avg. RT