Yes, it is allowed. The major restriction is that you cannot use the B-2 visa to reside in the US. If you do that, you can expect that at some point an immigration inspector will refuse entry.
However, you’re not coming remotely close to that in terms of the amount of time you plan to spend in the US. There is no explicit restriction on the frequency of visits, and the duration is typically limited, as you have already seen, to six months.