In 2369, the first probe from the Gamma Quadrant arrived at Deep Space 9, and an unusual program was accidentally integrated into the main computer core, along with the rest of the archive material. After a number of system-wide malfunctions, the program was discovered, but all attempts to transmit the program back to the probe failed.
It was realized that the program acted like a puppy in that it refused to leave, made the station's computer more obedient, and also craved constant attention, and thus was called "pup." Because the program was considered a lifeform, O'Brien decided the best solution was to store the "pup" in a subprogram, which he referred to as a "doghouse". He then stored the alien program to a secure "pup" file, which contained copies of the station's backup files, and other programs to keep it occupied. (DS9: "The Forsaken")