This exercise with an isostatic system, a piston in a cylinder, can be achieved in real life fairly easily. Just think of a standard piston that has a small weight on top of it, e.g., with mass 0.050 kg. The weight force is 0.49 N, no matter how high or how low the top moves. If the piston is rigid and has an area of, e.g., 0.000625 m2 (i.e., 2.5 cm x 2.5 cm) then it will add a pressure of 784 N/m2. That means that the weight ensures a common pressure of 784 Pa in the ideal gas.