I think that at least an exhaust valve will be open to allow the fuel burnt during the compression stroke to exit. Then, I suppose, this valve will close while another valve will be open as the piston pulls away from the top to draw fresh air and fuel in. Then comes the compression stroke with all valves closed and the piston reaching top dead center.