I don't think it would matter much - if you say hello to them, they might be really nice and say hello back, or they might ignore you or not notice, but for them it would probably be no big thing.
Once I was in that situation and the guy I said hello to didn't reply, which I found quite embarrassing at the time (I was 16), but then when he'd finished talking to my father he said hello back. Better late than never.
These days I'd probably still say hello but in a less pronounced way so it wouldn't show up so starkly if I were ignored, and couldn't be seen as an aggressive attempt to interrupt them. You have to allow for people being too locked into their existing dialogue to respond - personally I always feel bad if I get put in such a dilemma, I don't want to ignore anybody but I don't want to stop listening to the other guy either, because I feel that both responses would be rude. It's the same when two people try to talk to me at the same time.
When I was about 14, I recall trying to force my words onto the group of boys I was with - they were already talking, and I simply tried to override their conversation, even ended up knocking one of them on the head (though not terribly hard) just to get his attention, and shouting "RESPOND!!" - needless to say they didn't take kindly to that, and began to take a different bus so they wouldn't have to deal with me. Luckily I mellowed.
I was brought up NEVER to interrupt my "betters" - hopefully parents aren't quite so elitist these days, but this was the late 1950s when children were expected to obey. To this day I always feel reluctant to approach anybody about anything, which can give me a lot of anxiety in the workplace when I think the consequences of keeping silent may be even worse. An important machine broke down and the only people who could help were engrossed in converstaion - so I had to fight my shyness, waited for the nearest approximation to a pause in their talking, and said "Houston, we have a problem" in a clear but not over-loud voice. It worked. I wish they wouldn't put me in that position, but I don't see how they can avoid it. I've no idea whether it's AS or my poxy upbringing that makes it so hard for me to approach an authority figure - presumably it's both, making it doubly hard for me to be "normal."
Power sometimes comes into it. Some managers will just walk up and cut through any conversation they like, but they don't usually extend the same rights to anybody else. To some extent I guess it's justified - the idea is to get the work done, which is why they pay us. But it can sour things socially, which can reduce productivity, and what managers say isn't often so urgent as to justify cutting in like that.
For some reason I always think of Monty Python and the Holy Grail - the part where Arthur's trying to get help for his holy quest, and the guys on the battlements keep sliding back into a conversation about the flying weight of an albatross. Later on in the film there's a great line for anybody who needs to interrupt but doesn't want to come over as offensive:
"Please, good people, I am in haste!"
I haven't tried that one in real life yet. I suspect some folks would take it as sarcasm.