I will discuss recent work on studying operator algebras in semiclassical gravity. In AdS/CFT, for two-sided black holes, the large N limit of single-trace operators in the boundary CFT results in a type III von Neumann algebra. Quantizing the relative timeshift between the two boundaries and including this mode in the algebra promotes it to type II, which allows the von Neumann entropy to be defined and calculated. I will first describe how this works for semiclassical perturbations around the microcanonical TFD state, and show that the von Neumann entropy agrees with the generalized entropy of the black hole. I will then apply the formalism to deSitter spacetime, and discuss implications for the entropy of the static patch.