Sooner or later, mostly around 100k miles, many GM computer controlled engines develop trouble idling. They are fine under power but the idle moves up and down several hundred RPM and the engine is liable to stall when coming to a stop, This is the clasic "gunked up IAC" problem.
Many of the sequential, port, and tuned port fuel injections have a seperate idle air circuit. At idle the throttle plate (butterfly) closes entirely and all idle air is fed from a side passage which is controlled by an Idle Air Controller. This small device has a position sensor and a stepper motor inside which is controlled by the Engine (Powertrain) Control Module aka "The Computer" hence the connector has four wires. If the engine is running too slowly, a command is sent to increase the opening (if monitoring with a scan tool this is seen as an increase of "IAC counts"), if to fast, the command is to close. Normally the response is quick enough to keep the engine within 25 or 50 rpm of the desired speed even if quite slow (e.g. 625 rpm).
Problems occur when a sticky black combustion residue collects in the passage and slows down the action of the stepper motor. This causes the idle to swing often several hundred RMP as the "counts" lags and overswings the desired RPM. In extreme cases it can cause the engine to stall, typically as the car comes to a stop.
Cleaning the IAC is a simple matter of removal, cleaning, and reinstalling. On the 3800 "C" engine it is found to the right of and below the throttle body. Access is much simpler if the hose between the throttle body and the air cfilter box is removed. Before removal always place a rag under the IAC ares since otherwise if one of the small screws is dropped it will most likely roll under the intake plenium and be unretrievable. Is easiest to work on a cold engine particularly considering the close proximity to the crossover pipe.
To clean, spray the IAC pintle (shaft) and spring with cleaner until the drip is clean and let dry. Do not try to change the position of the pintle. I have used carb cleaner and alcohol. Others recommend throttle body cleaner. While the IAC is drying spray the recess in the manifold as well. Use a pushrod or screwdriver is several folds of rag like a pipe cleaner to wipe the inside of the IAC recess. Repeat until completely clean. The gunk in the manifold is usually the source of the problem.
Once clean (does not need to be dry) reinstall on engine. Note that the red rubber O-ring (see fig. 1) is not damaged. If it is I have made a gasket from a brown paper grocery bag that has worked well since there is no appreciable pressure involved.
The engine should now start and idle smoothly. As the car is driven it will recalibrate the positioning so do not be concerned if the idle speed is a little off at first. The important thing is that the idle should be smooth and without swings.
This same technique can be used on many GM cars since almost all with port fuel injection use an IAC.