I'm a little confused about the second law of thermodynamics and the consequence that the entropy can only increase. To demonstrate my confusion I want to point out two examples:
In the first example we consider the reservoir to be a part of the whole system while in the second we don't. Kardar says that the increase in entropy is relevant when we release some internal constraint while maintaining our system inside adiabatic walls. Then, the system will seek some new equilibrium state while increasing it's entropy. now, in the first example it is said that we release some internal constraint so why does the total entropy remains constant? by the same reasoning as in the second example I think that the entropy of the system (without the reservoir) should increase. does that mean that the entropy of the reservoir should decrease by the same amount? and if it does how come it does not violate the second law?
I know that these questions are basic but I am really confused about this so I hope someone can organize my thoughts. thanks :)