Problem about entropy Combining the first and second law of thermodynamics we can get the following equation
$$TdS=dU-P_{ext}dV$$
First question: Is this equation applicable for irreversible processes such that that $dS≠\dfrac{dQ}{T}$?
Second question:If the system temperature $T_{sys}$ is smaller than the surrounding temperature $T_{sur}$, which temperature should we put in the equation? 
I have this question because sometimes people use $T_{sur}$ instead of $T_{sys}$ (e.g. http://www.youtube.com/watch?v=jsoD3oZAAXI&list=WL, 19:45) but the equation is supposed to describe changes in the system.
 A: 
First question: Is this equation applicable for irreversible processes?

From the first law, we have:
$$
\mathrm{d} U = \mathrm{d}Q + \mathrm{d}W
$$
where $\mathrm{d} U$ is an exact differential, and $\mathrm{d}Q$ and $\mathrm{d}W$ are inexact differentials. It is thus remarkable to see that the sum of of two inexact differentials makes an exact differential! This suggests that it might be possible to turn the inexact differentials into exact differentials.
Indeed, for an hydrostatic system we can write:
$$
\mathrm{d} W = - p \mathrm{d} V 
$$
Furthermore, for a reversible process:
$$
\mathrm{d}Q = T \mathrm{d} S
$$
Thus, for a reversible process we obtain the following expression for the first law:
$$
\mathrm{d} U = T \mathrm{d} S - p \mathrm{d} V 
$$
Again, note that the above equation has been derived only for reversible processes. However, since $\mathrm{d} S$ and $\mathrm{d} V $ are exact differentials, and thus they are path-independent, the above equation is also valid for irreversible processes! Thus, if $\mathrm{d}Q < T \mathrm{d}S$, then this get compensated by the fact that $\mathrm{d} W$ is larger than for the reversible case.

Second question:If the system temperature $T_{sys}$ is smaller than the surrounding temperature $T_{sur}$, which temperature should we put in the equation? 

Remember that heat flows from "warm" to "cold", thus $T$ denotes the temperature of the object which rejects the heat $\mathrm{d} Q$. This means that $T$ does not necessarily denote the temperature of the system. This is consistent with the well known result:
\begin{equation}
\oint \frac{\mathrm{d} Q}{T} \leq 0 
\end{equation}
A: 
Combining the first and second law of thermodynamics we can get the following equation
$$TdS=dU-P_{ext}dV$$

There is little reason to use $P_{ext}$ here. Also the sign is wrong. The correct way to write the differential relation between entropy, energy and volume is
$$
TdS = dU + PdV
$$
where $T, P$ are temperature and pressure of the system and $S,U,V$ are its entropy, energy and volume. External temperature and pressure appear when deriving the rule "in spontaneous process, free energy decreases", which is a different matter.

First question: Is this equation applicable for irreversible processes such that that $dS≠\dfrac{dQ}{T}$?

Yes, if the irreversible process is such that the whole system is close enough to equilibrium state so that it has one temperature and one pressure. This happens for very slow irreversible process, for example very slow heat transfer by conduction.

Second question:If the system temperature $T_{sys}$ is smaller than the surrounding temperature $T_{sur}$, which temperature should we put in the equation? I have this question because sometimes people use $T_{sur}$ instead of $T_{sys}$ (e.g. http://www.youtube.com/watch?v=jsoD3oZAAXI&list=WL, 19:45) but the equation is supposed to describe changes in the system.

$T_{sys}$. Again, the above equation has nothing to do with inequalities derived for spontaneous processes. Only in those, the temperature is that of the heat reservoir:
$$
dS \geq \frac{dQ}{T_{res}}.
$$
A: In the video lecture mentioned in the question, the guy always use $T_{sur}$ in the inequality TdS>dU+PdV.   
In deriving the equation the "surrounding" (also see "The Principles of Chemical Equilibrium" by Denbigh, p.82, the term "thermostat" is used instead) is included as a bigger isolated system. Let's say the entropy of these bigger system is Si. Therefore $dS_{i}≥0$, it can be replaced by dS+dSsur≥0 where S is the entropy of the "inner" system and $S_{sur}$ is the entropy of the "surrounding". As heat is transferred the surrounding loses entropy so it becomes dS-dQ/Tsur≥0 and therefore $T_{sur}dS≥dU+PdV$.   
In the case that there is no chemical reaction, TdS=dU+PdV is always true as state equation. The T here refers to the "inner" system's temperature. There is no contradiction.
