Step 1: Recall what gain margin means.
Gain margin is measured at the phase crossover frequency \(\omega_{pc}\), the frequency at which the phase of \(G(j\omega)\) equals \(-180^\circ\). At that frequency,
\[
GM(\text{dB}) = -20\log_{10}\left|G(j\omega_{pc})\right|
\]
Step 2: Write the phase of \(G(j\omega)\).
\[
G(j\omega)=\frac{K}{(1+j\omega)^4}
\]
The phase contributed by each factor \((1+j\omega)\) in the denominator is \(-\tan^{-1}\omega\), and there are four identical factors, so
\[
\angle G(j\omega) = -4\tan^{-1}\omega
\]
Step 3: Find the phase crossover frequency.
Set the phase equal to \(-180^\circ\):
\[
-4\tan^{-1}\omega_{pc}=-180^\circ
\]
\[
\tan^{-1}\omega_{pc}=45^\circ
\]
\[
\omega_{pc}=\tan(45^\circ)=1\ \text{rad/s}
\]
Step 4: Find the magnitude of \(G(j\omega)\) at this frequency.
\[
\left|G(j\omega_{pc})\right|=\frac{K}{\left|1+j\omega_{pc}\right|^4}=\frac{K}{\left(\sqrt{1^2+1^2}\right)^4}=\frac{K}{\left(\sqrt2\right)^4}=\frac{K}{4}
\]
Step 5: Apply the gain margin condition.
\[
20=-20\log_{10}\left(\frac{K}{4}\right)
\]
\[
\log_{10}\left(\frac{K}{4}\right)=-1
\]
\[
\frac{K}{4}=10^{-1}=0.1
\]
\[
K=0.4
\]
Final Answer:
The value of \(K\) is
\[ \boxed{0.4} \]