CS 574

Homework 1

Due Monday, September 29, 2003

This homework is due at 11:00 if submitted electronically, or you can turn it in on paper in class at 11:30

Scheduling

Assume a SFQ two-level scheduler, as described in our Paper05. There are two job classes. Job class 1 is real-time, using a min-slack scheduling algorithm; this class is allocated 40% of the CPU. Job class 2 is "best-effort", using round-robin scheduling; this class is allocated the remaining 60% of the CPU.

Within the real-time job class, the following tasks arrive at Time 0:
Task NumberDeadlineTime RequiredTimes Blocked
1.11203070-100
1.22004050-110
1.31902060-160

You may assume prescience on the part of real-time tasks: they "know" in advance when they will be blocked and unblocked, and can use this information in calculating their slack times.

Within the best-effort job class, the following tasks arrive at Time 0:
Task NumberTimes Blocked
2.1140-180
2.2130-170
2.3150-180

Assuming a uniform 10 millisecond time quantum, draw a figure similar to Figure 3 in the paper showing the scheduling of these tasks and the progression of virtual time. Resolve ties by using the numerically lower task. Could the real-time tasks have met their deadlines if the best-effort tasks hadn't all been blocked simultaneously?

Page Coloring

Consider a computer system with the following cache and virtual memory characteristics:

Cache
The cache is 128K, 2-way set-associative, with a 16 byte block size, physically addressed.

Virtual memory
The system uses a single-level virtual memory with a 4K page size. Both physical and virtual addresses are 32 bits.

  1. How many bits of the virtual page number must remain unchanged to use page coloring?

  2. Assume that your physical memory is initially completely free, and that an uncolored page replacement strategy will select physical pages for you in the order 00010000, 00020000, 00030000, 00040000, 00011000, 00021000, 00031000, 00041000, 00012000, 00022000, 00032000, 00042000, 00013000, 00023000, 00033000, 00043000 (these are the starting phyical addresses of the pages).

    Calculate the cache hit rate for the following virtual address reference string: 12340000, 21431000, 3ac12000, 66733000, 12340000, 21431000, 66733000, 3ac12000

    Use page coloring to select a different order to bring the pages into physical memory. What is the cache hit rate now?


Last modified: Fri Sep 26 13:57:05 MDT 2003