Archive for May 2008
29
Greg Kroah-Hartmann Visits my Operating Systems II Class
No comments · Posted by admin in Linux/Unix, Operating Systems, Uncategorized
Greg Kroah-Hartmann, a leader in the linux community, visited my CS411 class last Friday, May 23rd.
He works for Novell in the SUSE Labs division, based out of Nurumberg, Germany. He said only one person works there in Germany while everyone else works around the world.
He explained how the hierarchy of the people who develop linux works. It’s very efficient because at some point a file will have been touched by at least two people.
Linus Torvalds and Andrew Morton used to pull the subsystem trees together by themselves, but now they use something better called Linux NEXT.
I asked him what kind of source control program was his favorite to which he replied, “git”.
There are some stagnated areas in the kernel development like PCMCIA and serial ports, but then again some older ports have been really active.
One thing I liked to hear was that he said, “The most linux kernel developers in the world are in Portland.” so I’m not too far away from some good innovators.
No tags
29
Linux 2.6.23.17 Shortest Seek Time First(SSTF) I/O Scheduler
No comments · Posted by admin in Linux/Unix, Operating Systems
Another CS411 project finished! This time around we implemented an I/O scheduler for Linux. What is an I/O scheduler you may ask? Well, it simply manages requests usually from a block device (e.g. hard disk, media drive) and not a character device. An I/O scheduler needs to be fair and give a share of the disk bandwidth to each running process.
With SSTF, requests are serviced based on their proximity to the disk head, with requests closest to the disk head being serviced first. Requests are kept in a queue. The SSTF algorithm looks at the current disk head position and iterates through the queue looking for the request that is the shortest physical distance away. That request is the one that gets serviced next, and the process continues.
Is this the best I/O scheduling algorithm? No. I’m afraid not. If there is a request that was physically very far from the disk head it would possibly never get serviced. This dilemma is known as “starvation”.
More efficient algorithms use an “elevator” approach wheras the disk head moves along the disk surface picking up requests (people on different floors) and when it gets to the end of the disk (top floor) it can turn around and pick up more people (more requests).
We used the built-in linked list structure provided by linux. Many helpful functions were found in list.h.
Here is a good article that discusses changes in the 2.6 kernel from linuxjournal.com.
No tags
5
Linux SLOB (Simple List of Blocks) Memory Allocator
No comments · Posted by admin in Linux/Unix, Main, Operating Systems
A recent project I completed in my Operating Systems II class was to improve the existing linux SLOB memory allocator from first-fit to best-fit. The kernel currently gives 3 choices of allocators (SLAB, SLUB, and SLOB). The SLOB (Simple List Of Blocks) allocator, is designed to be a small and efficient allocation framework for use in small systems such as embedded systems. Unfortunately, a major limitation of the SLOB allocator is that it suffers greatly from internal fragmentation.
There is a recent reply from Linus Torvalds himself on a Linux mailing list where he suggested the use of a best-fit algorithm.
The first-fit uses the first available space for memory. The best-fit algorithm my team implemented works by looping through the list of free pages until the first page found with enough free space. Then, we sort the list from smallest to largest free space. In this way the first space encountered by the algorithm will be the smallest space which fits the required amount available. Essentially, we are modifying the input to the algorithm to ensure better fragmentation rates and utilizing space on each page better.
There wasn’t a lot lines of code to add. It was a fairly simple hack, but I’m sure it could be even more efficient.
We compared the fragmentation from both algorithms and there was a definite difference.
The version of Linux we used was 2.6.23.17
No tags
X
No tags

Social Links