The first thing to understand is that users don't care about sessions, the session is something you as a developer are forcing onto the user to meet your security/application needs. In an ideal world the session would never expire, like Facebook, Hotmail etc.
That said in some situations such as bank sites we still need to expire sessions as we don't want to leave the door open for anyone to steal our money when we go to the loo or something.
Ok, so when we have to expire a session should we warn the user and give them the option to extend?
Well, Expiring a session is used to log the user out when they are not using the site/application to secure the data. Logically, if the user is still using the site then their session should not expire. Therefore warning the user of impending session expiry becomes irrelevant i.e. if the user is using the site they should never see it AND if the user is not using the site they will never see it.
If you have to have sessions which expire, focus your efforts on recording user activity better so that sessions do not expire for active users.
EDIT: E.g. For our web app I have developed a JavaScript engine which captures client side user interaction's such as, key down, mouse move, mouse clicks, scrolling etc. When a user event is fired an ajax request is sent to keep the session alive.
To avoid numerous ajax calls to the server every time a user moves their mouse you can set the JavaScript to only send an ajax request once every 5 minutes or so. i.e. If last user interaction time > greater than 5mins Then send ajax request to keep session alive.