Benutzer:Rdiez/YouProbablyShouldWriteProperShutdownLogic: Unterschied zwischen den Versionen

Aus /dev/tal
Wechseln zu: Navigation, Suche
(Weiterleitung nach Benutzer:Rdiez/PageRemoved erstellt)
 
Zeile 1: Zeile 1:
{{BenutzerSeitenNichtVeraendernWarnung|rdiez}}
+
#REDIRECT [[Benutzer:Rdiez/PageRemoved]]
 
+
= My embedded software never stops, so I don't need to implement a proper shutdown logic =
+
 
+
If you allocate memory dynamically (with malloc), sooner or later you will have to deal with some nasty [http://en.wikipedia.org/wiki/Memory_leak memory leak]. If your firmware can shutdown cleanly, you can dump all remaining allocations at the end. Otherwise, you'll have a hard time finding the leak.
+
 
+
It is very hard to take an existing software and retrofit a clean shutdown, especially if multiple threads are involved.
+
 
+
Implementing the shutdown logic from the first day will make you think properly about the lifetime of each service/task/component/thread. You will be glad if you need to reuse one them on another platform. Besides, if the need arises to reconfigure and restart a component on the fly, it will be much easier if the shutdown procedure has already been implemented.
+
 
+
In order to regularly exercise the termination logic, it's best to make it part of the firmware update procedure, so that the device shuts all components down before starting the new firmware. If the device can take a reset command from outside, that would be a good place to perform a software shutdown, right before the actual reset.
+

Aktuelle Version vom 22. März 2015, 21:01 Uhr

Weiterleitung nach: