4 ms·
But now you have two completely independent code paths. Both of which will need to go through the same maturation phase that the ST folks evidently went through
by samcday 7y ago
But now you have two completely independent code paths. Both of which will need to go through the same maturation phase that the ST folks evidently went through with mmap. And if the code needs to evolve for other reasons, potentially both of these paths will need some love too.
Seems like the worst choice in a situation like this!
- CoolGuySteve 7y agoThe read() API is so basic, mainly because it is synchronous and has clear return values, that I have a hard time believing it would present nearly as many issues.
- theoh 7y agoButler Lampson talks about the general concept of an overlay in operating system design. It's a slightly different case, on the surface, but the possible application in this case is that if mmap fails, you probably should have a fallback code path that tries to access the file normally. That's obviously not going to work for all applications. But it's something you consciously have to do anyway if mmap may not be available (e.g. when working across the network). The OS design should make it easy to move up and down in this hierarchy of access methods, but the application programmer still needs to know which "level" of access they have to the file. There's work to be done here in improving the design of the OS interface. That would lift part of the the burden of maintaining multiple paths in the application code. https://www.youtube.com/watch?v=TRLJ6XdmgnA&t=11m35s https://www.youtube.com/watch?v=TRLJ6XdmgnA&t=11m35s slides: https://bwlampson.site/Slides/Hints%20and%20principles%20(HLF%202015).pdf https://bwlampson.site/Slides/Hints%20and%20principles%20(HL... see also: https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-826-principles-of-computer-systems-spring-2002/lecture-notes/30.pdf https://ocw.mit.edu/courses/electrical-engineering-and-compu...