You put your card in the cash machine but nothing comes out. The bank's IT systems have crashed again.  But you need money fast, so what do you do?  It's an unsettling scenario that is likely to become more common over the next few years as the big banks try to upgrade their IT systems, experts are warning.  Global banking giant HSBC is just one of several major banks that have had intermittent problems with their technology, leaving customers unable to access online bank accounts and other services. Bank of America, Commonwealth Bank of Australia, ANZ Bank, Royal Bank of Scotland and NatWest have all suffered similar issues.  And these system failures - or outages in the jargon - undermine confidence in traditional banking and encourage more competition from nimbler start-ups.  "For the next five years - and we're talking globally - every incumbent banking player who's been around for a while will have an increased risk of outages," says Julian Skan, managing director of financial services at consultancy Accenture.  The problem is that the old mainframe computers - the workhorses of the global banking industry - have been chugging away keeping tabs on all our transactions for decades now. They're slow and reliable.  But the world has changed.  We've gone mobile and online. We expect real-time transactions and access to financial services around the clock.  The new computer systems and programming languages designed to cope with this fundamental shift in our behaviour don't interact well with the old, slower back-office systems.  Layers and layers of IT have built up over the years, gradually hobbling banks' ability to innovate and respond to this new world.  "Very often banking groups that have grown by acquisition have never fully integrated their systems," says Mr Skan.  "When a bank reaches a certain size it becomes too risky to change the core technology, so you build layers on top, and that adds complexity."  There can be hundreds of applications needing management just on the retail side of banking, says Sameet Gupte, global head of banking and finance for tech consultancy Virtusa, which names nine of the top 10 biggest banks as clients.  "Now expand that globally and include all the applications serving the investment banking side and the number of applications can run into the thousands," he says.  Mr Gupte likens the IT challenge big banks face to refitting an aeroplane while it's in the air.  "If you tried to change the crew, the engine, the navigation system, the wings, and everything else, all at once while in the sky, the plane would crash," he tells the BBC.  "This is the same with banking systems: if you try and change everything all at once then you will end up having to run two banks at once, in case anything went wrong, doubling your cost and increasing your risk."  This is why banks take a cautious approach to upgrades, changing things gradually, he says. But this takes time and leaves the field open to nimbler rivals.  "It's a challenge for banks, no question," says Ann Cairns, president of international markets at payments processing giant, MasterCard, which numbers 27,000 banks as clients around the world.  "If a bank needs to change out its core accounting platform it can take years to upgrade."  Not to mention the hundreds of millions of dollars it can cost.  Alistair Newton, research vice-president at tech consultancy Gartner, says: "These legacy systems brought scale and stability to big banks, but now they need flexibility and speed.  "We're reaching a tipping point where the benefits of upgrading will soon outweigh the costs."  This is because app-only banks like Atom Bank and fledgling start-up Mondo are unencumbered by old tech and building responsive, agile systems for the smartphone generation, with modish features like "authentication by selfie" and video chat customer service.  "Kids now want a cool experience on the phone. Banks are no longer the monoliths to be feared and respected," says Mr Gupte.  Another financial start-up with technology at its core is Future Finance, a Dublin-based firm specialising in making loans to students in the UK and Germany.  Brian Norton, founder and chief executive, says: "We built our systems from scratch so we get real-time database visibility and we look at a substantial amount of data to help us make our decisions.  "Everything is stored securely in the Microsoft Azure cloud and even our loan agreements are signed electronically, handled by Docusign."  The start-up has lent £25m to 3,500 customers so far but already sees the potential to expand into other financial products for students and graduates, Mr Norton says.  Money transfer services like WorldRemit, Azimo and TransferWise are using the latest technology to reduce the costs of sending money abroad, nibbling away at a traditionally lucrative business that banks used to subsidise less profitable parts, such as retail banking.  And peer-to-peer lenders, such as Zopa and RateSetter, are offering alternatives to personal loans sold by banks, albeit on a modest scale.  Another huge threat on the horizon for banks comes in the form of tech giants such as Google, Amazon, Facebook . In-app payments within social media environments are already becoming the norm, for example.  So are banks' days numbered?  While they may sometimes resemble lumbering dinosaurs under threat of extinction because of their inability to adapt to a rapidly changing environment, their size and age could also be their strength.  "People might not like banks in the same way that they like their social media providers, but they do trust them more," says Accenture's Mr Skan.  MasterCard's Ms Cairns agrees, asking: "Would you feel happy putting your money with a tech company? Banks are heavily regulated - they're just safer."  But "they need to start thinking and behaving like start-ups," says Chris O'Malley, chief executive of Compuware, a tech company trying to bridge the gap between mainframes and the fast-paced world of app development.  Technology of Business will explore this question later in our current financial technology series.  Follow Matthew on Twitter: @matthew_wall
Upgrading decades-old IT systems is expensive, difficult and risky, but the longer they leave it the more banks risk losing out to nimbler competitors.