Number of files: ...
Percentation of disk space lost to internal fragmentation across all files for block sizes ranging from 1-32 KB:
1 KB ... 32 KB % Internal fragmentation
You can produce a list of files in this directory with the find command, e.g.:
find /usr/include -print > ~/files.txt
will create a file called files.txt that contains the names of the files in /usr/include. You may find it more handy to store the file names in a shell variable. For instance, using the csh or tcsh shells:
set flist = `find /usr/include -print`
You can then use wc with the -c switch to find the character lengths of the files, e.g.,
foreach f ($flist)And with bash:
wc -c $f
end
for f in `find /usr/include -print`; do wc -c $f; done
You may need to write a simple program that computes the percentage of space lost to fragmentation. Or, if you are facile with spreadsheets, you may find them a good tool to perform this computation.
The zip program puts one or more compressed files into a single zip archive, along with information about the files (name, path, date, time of last modification, protection, and check information to verify file integrity).
When the file is restored, it is given the same name, time of last modification, protection, and so on. If desired, it can even be put into the same directory in which it was originally located.
If desired, can the file be restored into the same inode? If you don't know, think about it. Explain your answer.
The following problem is optional (not required, no points). You might find it useful as practice with synchronization for the final.
A group of students are studying for the CSE 120 midterm. The students can study only while eating pizza. If a student finds that the pizza is gone, the student waits until another pizza arrives. The first student to discover that the group is out of pizza phones Leucadia Pizzeria to order another Meat Combo pizza and then waits for the pizza to arrive. Each pizza has S slices.
Implement GetSlice and DeliverPizza methods to properly synchronize student threads and the pizza delivery thread using Java monitor mechanisms (Wait and Notify/NotifyAll). Your solution should be in the form of a Java class that compiles and runs. Your solution should avoid deadlock and phone Leucaida (i.e., wake up the delivery thread) exactly once each time a pizza is exhausted. No piece of pizza may be consumed by more than one student.
Below are five Java files to help you with the implementation. Your job is to implement the guts of the monitor in the fourth file, PizzaMonitor.java. The fifth file, BSem.java, is an example program showing how to use notify and wait.
java StudyGroup 8 Amako Byun Cheyenne Dmitrii Eija
When you test your program, try it both with more slices per pizza than students (like above) and more students than slices per pizza.