That's a good idea in theory, a bad one in practice. While it'd curtail just about all patent trolling in one fell swoop, it'd also mean all the practicing companies would end up being about 10 times as rabid with the lawsuits than they are now.
How so? What would cause companies to be any more protective of their intellectual property than they are now? Companies who use things in practice now already dice it up legally, so nothing would change on that front, and FRAND would still be FRAND, so I don't think we'd see any change at all save the elimination of patent trolling.
----------
If all patents on electronics and software had a limit of three years, we would have a lot less trouble with patent trolling, while still giving inventors a bit of a leg up and some incentive to continue inventing.
After three years, most tech is outdated anyway.
You don't need to invalidate all patents after two years. Companies who invent something should be able to license it, if it's being used, for more than just two years. Putting a hard limit on things like that disincentivizes innovation.