Is thermodynamic reversibility a function of path? Question: given a path taken by a system through state space, is it possible to make a statement such as 'that path corresponds to an irreversible process' or 'that path corresponds to a reversible process'?
Further remarks: I've been thinking about this in the context of ideal gases and $p-V$ diagrams. We often talk about a gas expanding reversibly and isothermally. Is it possible for a gas to expand isothermally and irreversibly? Or if you tried to enact such an expansion, would you not (by virtue of not expanding the gas infinitely slowly) cause small changes in temperature that would cause the path to deviate from a perfect isotherm? If such deviations would occur, then it would appear that the isotherm can be identified as describing a reversible process, with no additional information about how the path is traversed required.
To express it conversely: can, for a given path in state space, we always achieve reversibility by moving along it infinitely slowly? That is to say, is it in fact the case that 'reversibility and irreversibility' are properties which are not at all dependent on path taken, but rather on how the path is traversed as a function of time?
I feel as though I've seen images like this:

$$ $$
in which the paths are identified as corresponding to an irreversible and a reversible process respectively. This is consistent with another idea: I've often heard it stated that we can write $dW = -p\,dV$ for reversible processes only. This equation I have always found somewhat perplexing, since the left hand side is seemingly an inexact differential, whilst the right hand side seemingly exact! Is the resolution of this that the condition of reversibility restricts us only to certain paths for which the integral of $dW$ is indeed path-independent? Or perhaps $p\,dV$ is not an exact differential, since the variable $p$ is not solely a function of $V$? By this I mean: if $p = p(V,X)$ (where $X$ is just some other variable), then the integral of $p\,dV$ between two points would indeed depend on the path through $(V,X)$ space taken.
Yet more remarks: in traditional treatments of thermodynamics, after a discussion of the Carnot cycle and reversible cycles in general, the following result is arrived at:
$$ \oint \frac{dQ_\mathrm{rev}}{T} = 0 \,.$$
Using standard results of multi-variable calculus, this implies that
$$\int_\mathrm{init}^\mathrm{final} \frac{dQ_\mathrm{rev}}{T} $$
is path-independent. But if reversibility is indeed a function of path, what does it mean to integrate $dQ_\mathrm{rev}/T$ along an irreversible path? I've understood $\Delta Q_\mathrm{rev}$ for an arbitrary process to mean 'the heat that would be absorbed by the system between its initial and final states if it were to  move between the states by a reversible process'. So does the above integral mean 'integrate $dQ/T$ along a host of adiabats and isotherms (i.e. a zig-zagging reversible path) that best approximates the irreversible path'?
Or is it in fact the case that irreversible processes simply cannot be represented by $p-V$ diagrams, for instance? A gas which is expanded quickly enough as to generate pressure waves would not have a well-defined pressure, and so we would not be able to represent it by a point in state-space, perhaps?
Thank you.
 A: Many processes cannot be drawn on a p-V diagram because the pressure is not always defined.
Those processes that can be drawn are called "quasi-static". However, you cannot look at a certain path and say whether it represents a reversible or irreversible process for sure.
For example, imagine a vertical line on the p-V plot, corresponding to adding heat to a system of fixed volume. You can do this reversibly by only allowing the heat source temperature to be infinitesimally different from your system's temperature at any time, or you can do it irreversibly by keeping your heat source at a finite temperature difference from your system, but only allowing the heat to enter very slowly, so that the system achieves equilibrium and the pressure is well-defined. 
The path the process takes is the same in both cases, but one process is reversible and the other is not.
A: If a thermodynamic transformation is irreversible then by definition the variation of entropy of the universe $\Delta S_{univ}$ is strictly positive i.e.
$\Delta S_{univ} > 0$.
If the system is, say, in contact with a single thermostat then:
$\Delta S_{univ} = \Delta S_{sys} + \Delta S_{therm}$
The second principle of thermodynamics package tells two more things:


*

*Entropy is a function of the state of the system and therefore it does not depend on the path taken by it

*$dS_{sys} = \frac{dQ_{gained \:by\: sys}}{T_{sys}}$
Hence we can say that for any state A and B of the system
$\Delta S_{AB} = S_B - S_A \equiv \int_A^B \: dS = \int_{\gamma:A\rightarrow B}\:\frac{dQ_{\gamma}}{T_{\gamma}}$
Hence, one can calculate the variation of entropy of a system by calculating the above integral along any reversible path $\gamma$ that goes from A to B.
There are two conclusions that should not be drawn from what precedes however:


*

*The fact that we can calculate the entropy variation of a system in between any two states A and B via an integral along any reversible path relating them is a mathematical statement. It does not imply that the path actually followed by the system is reversible or quasi-static for that matter. 

*That doesn't imply either that the transformation is reversible because this conclusion can only be made once the entropy of the thermostat (or more generally of the outside) has been computed. And this requires to know the exact transformation undergone by the system.
A: For a single variable external work function where $p_{ext}$ is the external (control) pressure and $V_{ext}$ is external (control) volume the infinitesimal work performed is always $\delta W=−p_{ext} dV_{ext} $ irrespective of whether the process is reversible or irreversible, and at any speed. This is pure mechanics but if it is not reversible work then one cannot say that $\delta W = - p_{sys} dV_{sys} $ While it usually true that $dV_{ext} = dV_{int}$ if there is, for example, friction then $p_{ext} \neq p_{int}$. With reversibility the external control parameters are the ones that also describe the state of the system under control at any given instant, and that the relationship among the various intensive and extensive internal system parameters are time independent simple multivariable functions without any time derivatives (rates) being involved.
Reversibility and quasi-static are not the same. There are systems that in the words of Bridgman are completely surrounded by irreversibility independently of the speed of the process. A well-known example is a ferromagnet that upon executing a BH cycle dissipates the area enclosed in the hysteretic curve even if the process is infinitely slow. Friction is another example and so is plastic deformation.
Note also that in general $\delta W$ is not an exact differential unless you restrict the process. One example is an adiabatic process (can be either reversible or irreversible), that is one for which $\delta Q = 0$. This is because the internal energy $U$ is always a state function and with energy conservation $dU = \delta W + \delta Q $ so for an adiabatic process $dU = \delta W$, an exact differential. 
Another case is when you assume an isothermal and reversible process then from $\delta Q = TdS$ you get that $dU-\delta Q = d(U-TS) = \delta W$ again an exact differential.
