Question: I am trying to understand pMOSFET. I searched online tutorial saying that pMOSFET is like a closed switch if V(gs) < V(threshold), like a open switch if V(gs) > V(threshold), V(threshold) typically -1.5V. 

But when I do an online simulation, it show the following result. Does anyone know why the left one has current from Drain to Source but the right one doesn't ? Left one does't satisfy V(gs) < V(threshold) condition to closed the switch, but still has current flows. And why sometimes the gate, drain or source is in green, sometimes in shadow ?

[![pMOSFET](https://i.stack.imgur.com/BAzZA.png)](https://i.stack.imgur.com/BAzZA.png)

Answer: 
MOSFETs have a **body diode** which will conduct when the MOSFET is "backwards biased": in the case of a PMOS, when the drain-source voltage is greater than a diode drop.

It helps to have a MOSFET symbol which has the body diode included:

[![PMOS with body diode](https://i.stack.imgur.com/YuZLm.jpg)](https://i.stack.imgur.com/YuZLm.jpg)

This is an inherent "feature" or MOSFETs: in order to make MOSFETs work reliably, they end up with this body diode. In many applications: H-bridges, ideal rectifiers, etc, they come in handy, in others, not so much. However, that is simply part of the fun of using MOSFETs. For more information, see [Wikipedia: MOSFET body diode](https://en.wikipedia.org/wiki/Power_MOSFET#Body_diode) and [Digikey: Intrinsic Body Diodes](https://www.digikey.com/en/articles/techzone/2016/sep/the-significance-of-the-intrinsic-body-diodes-inside-mosfets).

So, don't connect your MOSFETs upside-down :)
In a P-channel MOSFET, the source needs to be more positive than the drain, otherwise the terminals switch roles. That means that in figure 1, the bottom electrode is acting as the source even though it is supposed to be the drain. In this case, Vgs is -5, since the gate is at 0V and the source is at +5.

Second, the MOSFET has a body diode that will conduct if the drain-to-source voltage is reversed. So even if you applied 5V to the gate -- which would turn off the MOSFET channel, you would still have conduction via the body diode.