Description
• Processes and Threads
• Synchronization and Scheduling
• Virtual Memory and Demand Paging
• Storage Organization and File Systems
• Networking and distributed systems
General Information
Announcements
Based on the discussions on Piazza, we decided to provide some hints for Assignment 5:
1) To access Freemap file in the file header function use the following code:
freeMapFile = new OpenFile(0);
directoryFile = new OpenFile(1);
BitMap *freeMap = new BitMap(NumSectors);
freeMap->FetchFrom(freeMapFile);
2) When you define the increment function, take care of the following conditions:
If the new NumSectors is greater than or equal to 30, this means you have ran out of sectors and you need to move to or create new table.
- Read the data stored in the last sector to see if the table has already been created or not.
- If yes, move to next table and call find again.
- If no, create new table and then call find.
3) Also return true or false from the Increment function to make sure that allocation was done or not. If the function returns false, simple exit the writeAt function as done before. This way you can avoid segmentation fault for big file when you complete Task 1. Simply return false if freemap->find() gives you more than 31.
Also for hints regarding how to increase the file size, check the create() function defined in the filesys.cc file.
I was told that very few of you showed up to the guest lecture by Prof. Sathish Gopalakrishnan today. I already told you, but in case this wasn't clear, I *will* be asking questions based on the material the covered in the final exam. I've uploaded his slides, so you may want to look at them if you weren't in class today. Thanks,
- Karthik
Below is the link to the Google sheet of all the marks till today, including assignment 1~4 and midterm exam 1~2.
https://docs.google.com/spreadsheet/ccc?key=0Ap0rW1aFW357dFBKaUpGMVg1V0RwYWZURkhSemdXLXc&usp=sharing
Thanks,
Qining
Please use the updated version of Nachos for assignment 4. There was a minor error in the array2.c test file. Either you can download the complete nachos or just replace the attached file in the test folder.
Thanks
Nachos for Assignment 4 has been released. It contains solution for Assignment 3
For Assignment 4, you will need to modify addrspace.cc and exception.cc files for this assignment. Please follow the hints given in comments. Just search for
//TODO EECE 315 Assignment 4
We have provided sufficient hints for this assignment, if you have any queries please feel free to ask during the lab sessions next week.
You will need to execute 2 test files for this assignment.
./nachos -x ../test/array
./nachos -x ../test/array2
The first test code execute successfully where as the second one does not due to lack of memory.
Once you complete Task 1, and test your code.. Test case 1 should be executing fine but not test case 2.. As you just added demand paging and not virtual memory.. If your demand paging code is working fine you can move to task 2.
Once you complete Task 2, your code for the second test case will be working fine and the output will be similar to the previous case (only exit status will be different, that's okay)
Current output for both the test cases is attached below.
Please use the updated version of Nachos for assignment 3. There was a test case missing from the previously released version for assignment 3.
Sorry for the confusion. Here is the direct link otherwise you can download from the resources page.
https://piazza.com/class_profile/get_resource/hcb08noy2zs5mp/hs7ukib19xk3w5
Assignment 3 is available now. Similar to assignment 2 we have added a new version of Nachos with test cases specific to Assignment 3. Please use the updated version of Nachos for this assignment.
Assignment 2 is made available. We also distributed a new version of Nachos for this Assignment, that include additional test cases to test the assignment code.
Name | Office Hours | |
---|---|---|
Karthik Pattabiraman | When? Where? | |
Qining Lu | When? Where? | |
Kartik Bajaj | When? Where? |