Bugaboo:
I am planning to attach an interrupt for raising signal on the input pulse and do a "count++" every time the ISR is called and every third count I want to hold the output pin high for 1.5x second.
I do not want to do a polling in the loop, if possible, and want to use pin interrupts.
Since interrupts are quite unsuitable for this purpose, the question is - why?
Bugaboo:
My concern is that by the time I come back from setting the output pin from high to low, I would have missed a pulse.
You seem to have that backwards. Setting the output pin from high to low is much faster than servicing an interrupt. Unless the pulses are very narrow - and you indicate the very opposite - you will have plenty of time to poll them.
The very last thing you want to do in an interrupt routine, is something of any complexity and servicing the interrupt invokes an significant additional time penalty in itself. So long as you write your main loop properly so that it never waits for anything, you can manage very fast events.
On further consideration, I realise the absurdity of your proposed plan. You are imagining that you would perform timing inside the interrupt routine itself - now of course, the "millis" function itself is interrupt driven, so this could never work on that basis alone. You are suggesting that you would wait for pulses inside the routine that responds to pulses. Well, of course that does not make sense.
Looking at your diagram, I figure it is misleading. If the pulses are "square" - that is, 50% duty cycle, then what I think you are trying to do, is to symmetrically divide the frequency by three. Is that correct?
If so, the algorithm is a twelve step state machine. State zero (and all even states) waits for a rising edge, state 1 (and all odd states) waits for a falling edge. State 5 sets your output high, state 11 sets it low.