lfok / unixproject Goto Github PK
View Code? Open in Web Editor NEWThis project forked from svenkatr/linux
Fall 2011 Unix Project
License: Other
This project forked from svenkatr/linux
Fall 2011 Unix Project
License: Other
Make a new directory (outside of the kernel tree) named proj01-iosched/. Copy the noop I/O scheduler source code (at block/noop-iosched.c) into the new directory, and name this copy proj01-iosched.c.
Create a new branch in your repository . Name it linux-2.6.23.17-my_syscall. As you modify the code in this branch, check your changes regularly.
Within the new branch, write a new system call function in kernel/sys.c that identifies itself and then displays the system time. Name your function sys_teamxx, replacing xx with your team number, and provide a brief description of the function.
Add a header block to proj01-iosched.c containing your team name and the names of your team members.
Change the names of the noop scheduler functions to begin with proj01 (instead of noop). Similarly, change the name of the elevator-type function.
Modify the fields of the elevator-type structure so that your functions can be recognized by the kernel. Change the elevator-name field to your team's name (e.g., team03).
Change the fields of the author and description macros appropriately.
Make a branch in your repository based on the vanilla kernel and named linux-2.6.23.17-slob_syscalls.
Within this new branch, devise a method to keep track of all of the memory claimed by the SLOB allocator for small allocations (i.e., every time the if(!b) beginning on line 331 of slob.c is entered) along with the amount of memory that was not served in an allocation request (i.e. the amount of memory contained in all blocks on the free list). Write separate system calls at the bottom of mm/slob.c to return each of these amounts in bytes and as an unsigned int, respectively called sys_get_slob_amt_claimed() and one called sys_get_slob_amt_free().
Use the program you wrote in task 4 to compare the amount of fragmentation suffered by SLOB using the first-fit algorithm and the amount suffered by SLOB using the allocation algorithm you chose to implement. Record your observations and conclusions in a README file.
Make a patch file representing the changes between your linux-2.6.23.17-xxx_fit_slob branch and the vanilla kernel. Name your patch file either
linux-2.6.23.17-best_fit_slob.patch
or
linux-2.6.23.17-worst_fit_slob.patch
depending on what allocation algorithm you implemented. Make sure this patch contains only the changes you want to submit, no experimental changes.
Make another branch in your repository based on the linux-2.6.23.17-slob_syscalls branch and name it either
linux-2.6.23.17-best_fit_slob
or
linux-2.6.23.17-worst_fit_slob
depending on what algorithm you are going to implement. Within this new branch, modify mm/slob.c so that it uses either the best-first or the worst-fit algorithm. Begin with the function slob_alloc(), and make changes elsewhere as appropriate. The changes necessary to do this should not be too significant, so if you find yourself writing many lines of code you should rethink your implementation.
Make sure you add a section to the file header including your team number, the names of your team members, and a description of the changes you made.
Append your system call to arch/i386/kernel/syscall_table.S.
Edit include/asm/unistd.h to provide your system call's number.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.