bigodanktime
You are right, if you are directly modifying the mmaped region. I always internally model my data as staging my changes to be synchronized to the mmaped region, so thats my mistake there.
> the page is either unwritable or CoW.
This is not universally true, or maybe I'm confused on this statement. MAP_SHARED exists, but maybe you are referencing a specific kernels' implementation on how they achieve coherence between file backed shared memory regions in two processes? Im not sure.
> Darwin kernel does though.
Sure we can always point to a kernel that has has implemented some feature or another, which is why I said typically you don't see it.
An advantage of copying in userspace is the ability to use more performant instructions to perform the memcopy, which the kernel does not typically have access to (https://www.mongodb.com/blog/post/getting-storage-engines-re...)
Related Work on this problem: 1. https://www.mongodb.com/blog/post/getting-storage-engines-re... - talks about developments on MongoDB's backend to use mmap. 2. https://www.pdl.cmu.edu/PDL-FTP/Database/p13-crotty.pdf - Talks about some of the cons of mmap, some I think are not as prevalent due to the existence of low latency, high throughput storage devices. 3. https://www.cs.cit.tum.de/fileadmin/w00cfj/dis/_my_direct_up... - less relevant but related.
I guess it depends on how you view an academic institution, is it to produce good thinkers or produce good work, although similar seems like you approach it in different ways when approaching it from one way or the other.
I'm not even upset with professors, I think Assistant Profs do the most work I've ever seen anyone ever do, its absolutely insane the crazy workload they take on to get tenure.
That being said this is from my experience and am unsure how it is at other schools.
Edit: Also intelligence is an over-rated metric, persistence is far more important when it comes to these hard problems.
Obviously, one could eliminate the cold start issue in general by just constantly paying for a running EC2 instance.
But cold start is still an issue for the provider as cold start is a cost to them, even reducing cold start of internal runtimes would be a massive benefit (For example pre-warmed JITs). Better cold start times means better bin packing for their services, and overall less cost to everyone.
https://arxiv.org/pdf/2101.09355.pdf
Also predicting function calls to properly schedule and reduce cold start latency
My guess is java is slow as it works really well when the JIT can optimize your code. Longer running functions will very likely outperform python.