What's the approach used by OSes that "just work" for things like this? Is this due to the more monolithic kernel of Linux making more things required to be known up front than e.g. in Windows?
- Most OSes do a full dhcp look up when they connect to a network even if they have connected to the network before. Wifi saved networks is a good example of a network where you have some historical information on the connection
- MacOs however keeps track of the IP addresses that it saw for each of the networks it has connected to recently. If it sees a network it's been on before, it first tries to just use the old IP address. This is under the assumption that the lease is still tied to the user's laptop.
- In the best case, the laptop gets a working IP very quickly and in the worst case, you just do dhcp again
- From a user's perspective, if they walk into a meeting with a bunch of folks with non Mac laptops, it will seem like the Mac connects much faster than everyone else's machine
When I read this story, the author pointed out that many people say "Macs just feel like they work better!" and used this as an example. Granted, this partly comes from owning the ENTIRE stack from hardware to drivers to OS etc which is something only Mac can do.
IIRC it does, and otherwise throws out (or used to) an ARP check (or something like that) to see if any one on the local link is using the IP. A properly behaved DHCP server would not hand the IP again to someone else if the lease hasn't expired.
Is there one? I know that unplugging a Thunderbolt peer will crash my MacBook Pro (bridgeOS, not macOS, panics). Disappearing buses is an edge case that is little-tested on most operating systems.
Hot-plugging Thunderbolt devices is hardly an edge-case on Macs, it's a heavily advertised feature.
I had about weekly kernel panics or machine freezes (would not wake from sleep) while unplugging my Thunderbolt dock (with displays and lots of devices) all throughout the USB-C Intel Mac era, but they all went away when I got an M1 Pro machine, so I wonder how much is down to OS design vs drivers vs hardware (vs how specific hardware influences driver design).
The M1 lacks the T-series coprocessor altogether and all its functions are inside the main SoC. Whether that means that bridgeOS still runs on non-architectural cores inside the SoC, or its responsibilities have been rolled into macOS, I have no idea. I do know that only my T2-having MacBook suffers from these panics.
- Most OSes do a full dhcp look up when they connect to a network even if they have connected to the network before. Wifi saved networks is a good example of a network where you have some historical information on the connection
- MacOs however keeps track of the IP addresses that it saw for each of the networks it has connected to recently. If it sees a network it's been on before, it first tries to just use the old IP address. This is under the assumption that the lease is still tied to the user's laptop.
- In the best case, the laptop gets a working IP very quickly and in the worst case, you just do dhcp again
- From a user's perspective, if they walk into a meeting with a bunch of folks with non Mac laptops, it will seem like the Mac connects much faster than everyone else's machine
When I read this story, the author pointed out that many people say "Macs just feel like they work better!" and used this as an example. Granted, this partly comes from owning the ENTIRE stack from hardware to drivers to OS etc which is something only Mac can do.