elliott-beach / project3

http://www-users.cselabs.umn.edu/classes/Fall-2017/csci5103/PROJECT/PROJECT3/project3.pdf
0 stars 0 forks source link

rm.cc #10

Closed ghost closed 6 years ago

ghost commented 6 years ago

Here's rm.cc and a couple of things fixed in unlink.

I'm still not sure about the best way to implement the check for whether any other processes have the file open. There's no really good way to check how many times a given file is open, besides just searching through the entire openFiles array and comparing file descriptors

elliott-beach commented 6 years ago

We don’t have any performance requirements other than correctness, so I think being O(n) on the number of open files is fine. That’s probably how it’s implemented in the Linux kernel anyway.