djones, I was talking about uniform discipline, whether the USAF is actually capable of 'Work" is another question entirely.
Frank, the question you ask is one for which you in turn will hate the answer, because the answer is "It depends." There is a wide spectrum of varying degrees of control when units of different services or even separate commands are put together, and the nature of the assignment order determines the degree of control. This is the Readers' Digest version:
The most minimal level would be 'Attached for support only' which basically gives the gaining commander no real authority over the strap-hangers who show up, and that's closest to the relationship djones was describing. It's basically a pain in the ass for the gaining commander since he has responsibility to feed them and tuck them in, but no real control over them to even get them to clean up after themselves. This is something the gaining commander usually doesn't want but has been foisted on him because a higher level of command has decided to put the visitors there to perform a function the higher command deems important, though it does the local gaining commander no particular immediate good as opposed to the visitors staying somewhere else entirely.
In the middle is 'OPCON' or 'Operational Control,' which means the gaining commander still has life support responsibility but can now order and direct the coming, going, and activities of his guests to support his own mission. The visitors are there to perform some purpose that more or less directly supports the gaining commander's own mission execution, which would be the most likely situation for the Army/Marine example you mention. The gaining commander does not have actual UCMJ jurisdiction to punish misconduct, that goes back to the visitor's own service or unit (If in the same service as the gaining command). The orders of the gaining commander are however completey lawful orders and the visiting lower-level commander defies them at his peril, though the actual consequences would be formally imposed by his home unit.
Tightest is full attachment for all purposes, in Army orders this will either include the phrase 'Attached for adminstration' or 'Attached for rations, quarters, and UCMJ' plus some information about duration and mission. Other-service elements are never attached this fully, for maneuver forces the type of attachment used is usually OPCON for the length of a specific operation, until a given date, or until some specific event occurs or fails to occur.