Controlling the engine is the most processor- intensive job on your car, and the engine control unit (ECU)is the most powerfil computer in most cars. the ECU uses closed-loop control, a control scheme that monitors outputs of a system to control the inputs to a system, mananing the emissions and fuel economy of the engine (as well as a host of other perameters). Gathering data from dozens of different sensors, the ECU knows every thing from coolant temparature to the amount of oxygen in the exhaust. with this data, it performs millions of calculations each second, including looking upm values in tabels, calculating the results of long equations to decide the best spark and timing and determining how long nthe fuel injector io s open. The ECU does all of this to ensure the lowest emissions and best millage.
A modern ECU might contain a 32 bit, 40 MHZ processor. this may not compared to the 500 to 1 MHZ processor you probably have in your PC, but remember that the processor in your car is running much more efficient code then the one of yiur PC. the code is in average ECU takes up less than 1 megabite( MB) of memory. by comparision, you probably have atleast two gigabytes (GB) of programs on your computer --- thats 2000 times the amount in ECU.