Practical Assignment (10 points)
Begin Date: Thursday, Nov. 20, 2014
End Date: Friday, Jan. 16, 2015 (extended from Dec. 4)
Students are allowed and encouraged to use the literature recommended in the course; use of other literature is also encouraged; assignment must be completed independently and without the help of other colleagues or the teacher.
Students should complete the assignment considering Instructions for Practical Assignments in Computer Science at the Linnaeus University.
The Swedish Council for Higher Education (UHR) states,
“For a Degree of Bachelor the student shall
- demonstrate the ability to search for, gather, evaluate and critically interpret the relevant information for a formulated problem and also discuss phenomena, issues and situations critically
- demonstrate the ability to identify, formulate and solve problems autonomously and to complete tasks within predetermined time frames
- demonstrate the ability to present and discuss information, problems and solutions in speech and writing and in dialogue with different audiences, and
- demonstrate the skills required to work autonomously in the main field of study.”
A summary of typical questions and the corresponding answers.
Q1: I can not do the assignment, because I never heard about the Shortest-Remaining-Time algorithm mentioned in the assignment description.
A: Please study the slides of Lecture 4 that is focused on Scheduling and study the Chapter 5 of the book (*).
Q2: I do not know how to get started with the practical assignment.
A: Please study the Description and Instructions.
Q3: I am having difficulties with the practical assignment, because I am not familiar with Java programming that involves threads.
A: We presume that students that attend OS course are familiar with the Java language. To refresh the knowledge about Threads and Concurrency one may consider studying “The Java Tutorials: Concurrency”
Q4: Are we allowed to modify the source code.
A: You may slightly extend the source code to maintain your required data, if you need to do so. You should not modify the functionality of the kernel. Please remember to identify your changes in the code, explain the modifications in the report, and submit all required files to run your program. In the Source Code you can find three test programs (Testa, Testb and Testc) to test your scheduler.
Q5: I am going to visit Lapland and will have little time to complete the assignment.
A: We advise students to give the highest priority to studying during the teaching period and after the completion of the assignment use the Christmas Holiday season for traveling and vacations.
Q6: In which order the parent thread (e.g., Testa) and child threads (e.g., TestThreada, TestThreadb, etc) should run?
A: The parent thread is not involved in the scheduling simulation. The aim is to only schedule the child threads, i.e., TestThreada, TestThreadb etc. In other words, Testa can run concurrently with a child thread, e.g., it can create and add a new thread while it is running concurrently with a child but the children can NOT run simultaneously. This is because we want to simulate the algorithm on a single-core CPU and it is not possible to run two threads in parallel on one CPU. You can use thread.suspend, thread.resume and thread.start to write your scheduler.
Q7: Which kind of test program is used to test our schedulers?
A: We use a similar test program as those given in the source code, but with different arrival times, burst times and orders.
Q8: There are two RR schedulers uploaded in the website. If we want to use the existing RR schedulers
to develop our multi-level feedback queue, which one shall we use?
A: In case that you prefer to use an existing implementation of RR scheduler, you may consider using the Scheduler implementation provided with the assignment description.
Q9: Shall we consider Loader in the simulation?
A: It does not matter if you consider Loader or not. Remember to mention in the report if you have considered it or not. When a thread is created, you can simply pass an argument showing if it is involved in the scheduling simulation or not. If not, you have to change the kernel slightly to start the thread immediately. When a child terminates, you need to change the kernel a bit to wake up the parent. Note that Loader is created by Boot.
[*] Operating System Concepts, 9th Edition, by Abraham Silberschatz, Peter B. Galvin, Greg Gagne (ISBN: 978-1-118-09375-7) (Adlibris)