Feersum Endjinn by Iain M Banks.
Ah, Earth. You can keep all your exotic worlds populated by giant sentient slugs and super-intelligent shades of the colour blue, and your Dyson spheres and your infinitely-long quantum singularities, you can't beat good old Earth. Having said that, this earth is a bit different from the one you and I are familiar with. For a start, there's no Swindon, and furthermore there seems to have been some non-specific apocalypse that's left a lot of high-tech megastructures, nay, indeed, gigastructures around that no-one knows how to use any more.
That's not to say people are just sitting around, though: there are things to be done. Gadfium is the Chief Scientist of the ruling class and is tasked with interpreting some weird goings on on the Plain of Sliding Stones, some sort of equivalent of Racetrack Playa with much mystical divination applied to the movements of the stones. Gadfium determines that the recent highly unusual movement of the stones is some sort of coded message from the upper levels of the gargantuan Serehfa Fastness, a kilometres-wide, kilometres-high castle parts of which no human has visited in decades.
Bascule is a Teller, one practised in communication with the Crypt, a sort of virtual cyberspace realm where much information is stored, sentient programs roam freely and dead people's mind-states are uploaded so that they can live on, in some sense at least, after their deaths. "Death" isn't as final as we might imagine as some uploading of mind-states into new physical bodies goes on, but there is a limit after which you only get to live on in virtual form.
As if to illustrate this, Sessine, a high-ranking government official, is unexpectedly assassinated by one of his bodyguards. This being his last physical life he then awakes in the Crypt's reality and is then rapidly killed another half-a-dozen or so times in quick succession, just to emphasise that someone really wants him properly dead. Eventually he awakens in a location that turns out to be a secure space that someone set up for him many years before in highly-prescient preparation for just this sort of series of events. That someone turns out to be himself, or at least a previously-uploaded copy of his former mind-state. So now all Sessine has to do is work out who multiply-murdered him and see what he can do about it. Time is on his side, though, as each second in the "real" world corresponds to many days in Crypt time.
Speaking of real-world reincarnation, while all this is going on a young woman awakens in a mysterious building, wanders around a bit and encounters some kind and helpful people who clothe her and accommodate her while she tries to remember who and/or what she is. What she is, it turns out, is some sort of sentient program from within the Crypt, sent into the "real" world to facilitate the passing of some knowledge to those that need it, knowledge of this kind having been suppressed for many generations by the ruling class. This is as a result of some upheaval involving a significant chunk of humanity (the Diaspora) leaving the planet to spread themselves out across the galaxy and beyond, and those left behind instituting some sort of science-denying regime to further their own ends at the cost of being able to avoid a planetary-scale catastrophe should it occur. And well whaddaya know here is exactly such a catastrophe, the solar system's slow drift into a huge dust cloud, a process known as the Encroachment whose end result is likely to be the extinguishing of all life on Earth.
Sounds bad, right? Well, yeah, and it will require some co-operation between the various protagonists to get out of this tight spot. Firstly, Gadfium, with some virtual-realm help from Sessine, has to help the real-world Asura survive long enough to deliver her message to those that need it, not straightforward given that most of the ruling elite want her rubbed out, and then Bascule has to physically gain access to the upper reaches of the Fastness to make contact with whoever has been sending the cryptic messages and facilitate them and Asura making contact with each other to unlock the mechanism for averting disaster.
That mechanism, the "feersum endjinn" of the book's title, is never very clearly explained, but appears to be some system of propulsion powerful enough to shift the entire solar system out of the way of the Encroachment. Which is nice.
But why the krayzee spelling, you'll be asking. Well, that's because all of the sections told from Bascule's perspective are rendered in this way. Something that, if you're a tedious literalist like me, might make you ask: since this only works with written text, does that mean this is some sort of journal that Bascule is keeping?
You might also say: just a minute there, this is a very similar device to the one used throughout Riddley Walker, and in fact there are some other similarities as well, notably the whole thing about remnants of an ancient civilisation ill-understood by a technologically-regressed population. I mean, there are differences: the guys in Riddley Walker were properly back at the bashing rocks together stage whereas here they've still got machines and computers and stuff.
Now that we've cracked the seal of comparing bits of Feersum Endjinn to other things, let's do a few more: the whole separate virtual realm that the living can port into in some way is familiar from William Gibson's Neuromancer and its sequels, not to mention countless other books, and the thing about stepping down levels of reality and finding time slowing down relative to the "real" world will be familiar to anyone who's seen Inception. And the thing with Asura as human bearer of some piece of corrective computer code which has to be re-inserted into the virtual realm in some way to fix things is not unlike the function of Keanu Reeves' character in the Matrix movies. The business of digging into the substrate of the Fastness that some of the military engineers have been tasked with doing to try and unearth something is a bit like the similar operation that's going on in one of the sections of Banks' own Culture novel Matter, and, lastly, the adventurous go-getting segment of the population of a planet finding a way of separating itself from their less-adventurous fellow-planet-occupants is similar to what happened to the Golgafrinchans in The Hitch-Hiker's Guide To The Galaxy, only in reverse (i.e. there it was the useless segment, telephone sanitisers and all, who jetted off in the spaceships).
That's not a blanket accusation of plagiarism, by the way; for one thing both Inception and The Matrix post-date Feersum Endjinn (published in 1994) by several years, and many of these tropes are widely-used across the world of speculative fiction. I do think it's almost impossible, though, that Banks wasn't influenced by Riddley Walker (published in 1980).
Anyway, I enjoyed this more than the other non-Culture (but still with the "M") Banks, Against A Dark Background, even though there a few things that don't really add up: the purpose of the weird gibbering flayed skulls that pop up occasionally in the in-Crypt sections isn't very clear, unless it's just a general indication of the descent of certain parts of the virtual world into chaos, and, more fundamentally, the idea that the leftover engineering on Earth could include something able to invoke the movement of an entire freakin' solar system in such a smooth and non-disruptive way as to not throw any of the planets off into deep space is a bit, well, implausible, even with the slightly different plausibility parameters that reading a science fiction novel requires. It's lots of fun, though, and at 279 pages fairly short by Banks' usual chunky standards.
Feersum Endjinn won the British Science Fiction Association award for best novel in 1994; other winners on this list include Inverted World (1974), Banks' own Excession (1996), The City & The City (2009) and Ancillary Justice (2013).