Light generation, size constraints, and dynamic cavities in silicon photonics