Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #30887
| From | Dimiter_Popoff <dp@tgi-sci.com> |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | Re: Multithreaded disk access |
| Date | 2021-10-31 21:55 +0200 |
| Organization | TGI |
| Message-ID | <slmsbf$v3v$1@dont-email.me> (permalink) |
| References | (4 earlier) <skk2fr$ooe$1@dont-email.me> <skk753$tmp$1@dont-email.me> <skkmg9$hl3$1@dont-email.me> <skkpv8$8cc$1@dont-email.me> <slmqba$b12$2@z-news.wcss.wroc.pl> |
On 10/31/2021 21:21, antispam@math.uni.wroc.pl wrote: > Dimiter_Popoff <dp@tgi-sci.com> wrote: >> >> Now this is where the worst fit allocation strategy becomes the game >> changer. A newly created file is almost certainly contiguously >> allocated; fragmentation occurs when it is appended to (and the >> space past its last block has been already allocated in the meantime). >> I think I saw somewhere (never really got interested) that mainstream >> operating systems of today do just first fit - which means once you >> delete a file, no matter how small, its space will be allocated as >> part of the next request etc., no idea why they do it (if they do so, >> my memory on that is not very certain) in such a primitive manner >> but here they are. > > There was some research and first fit turned out to be pretty good. > But it is implemented slightly differently: there is moving pointer, > search advances it. So, after deallocation you wait till moving > pointer arrives to the hole. Way better than immediately filling > hole: there is reasonable chance that holes will coalece into > bigger free area. Another point is that you refuse allocation > when disc is too full (say at 95% utilization). The two things > together mean that normally fragmentation is not a problem. > This might be somewhat better than plain first fit but it can be no match to worst fit. They probably don't do worst fit because they must have huge amounts of memory to dig through due to poor filesystem design (they have to go through 32 bits or more for each cluster). In DPS the CAT is one bit per cluster which makes worst fit doable without any problems like that. I have enhanced it a little (many years ago) noticing that the partition could come to a point where it has two almost equally sized empty parts; now you append to a file, it gets some clusters from one of these; next time you append to it the *other* one is the largest and it takes from it... :). So now dps first checks if there are empty clusters to allocate in succession of these already allocated to the file, if none then it does worst fit.
Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-15 07:08 -0700
Re: Multithreaded disk access Richard Damon <Richard@Damon-Family.org> - 2021-10-15 11:38 -0400
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-15 09:00 -0700
Re: Multithreaded disk access Richard Damon <Richard@Damon-Family.org> - 2021-10-15 12:48 -0400
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-15 11:40 -0700
Re: Multithreaded disk access Dimiter_Popoff <dp@tgi-sci.com> - 2021-10-15 18:46 +0300
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-15 09:19 -0700
Re: Multithreaded disk access Dimiter_Popoff <dp@tgi-sci.com> - 2021-10-15 19:28 +0300
Re: Multithreaded disk access Brett <ggtgp@yahoo.com> - 2021-10-17 20:27 +0000
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-17 14:49 -0700
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-17 15:01 -0700
Re: Multithreaded disk access Dimiter_Popoff <dp@tgi-sci.com> - 2021-10-18 01:09 +0300
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-18 08:05 -0700
Re: Multithreaded disk access Dimiter_Popoff <dp@tgi-sci.com> - 2021-10-18 19:25 +0300
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-18 13:46 -0700
Re: Multithreaded disk access Dimiter_Popoff <dp@tgi-sci.com> - 2021-10-19 00:46 +0300
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-18 16:17 -0700
Re: Multithreaded disk access antispam@math.uni.wroc.pl - 2021-10-31 19:21 +0000
Re: Multithreaded disk access Dimiter_Popoff <dp@tgi-sci.com> - 2021-10-31 21:55 +0200
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-25 04:19 -0700
Re: Multithreaded disk access Richard Damon <Richard@Damon-Family.org> - 2021-10-25 20:23 -0400
Re: Multithreaded disk access Don Y <blockedofcourse@foo.invalid> - 2021-10-25 22:29 -0700
Re: Multithreaded disk access Clifford Heath <no.spam@please.net> - 2021-10-18 11:58 +1100
csiph-web