Flat memory model

Flat memory model or linear memory model refers to a memory addressing paradigm in which "memory appears to the program as a single contiguous address space."[1] The CPU can directly (and linearly) address all of the available memory locations without having to resort to any sort of bank switching, memory segmentation or paging schemes.

Memory management and address translation can still be implemented on top of a flat memory model in order to facilitate the operating system's functionality, resource protection, multitasking or to increase the memory capacity beyond the limits imposed by the processor's physical address space, but the key feature of a flat memory model is that the entire memory space is linear, sequential and contiguous.

In a simple controller, or in a single tasking embedded application, where memory management is not needed nor desirable, the flat memory model is the most appropriate, because it provides the simplest interface from the programmer's point of view, with direct access to all memory locations and minimum design complexity.

In a general purpose computer system, which requires multitasking, resource allocation, and protection, the flat memory system must be augmented by some memory management scheme, which is typically implemented through a combination of dedicated hardware (inside or outside the CPU) and software built into the operating system. The flat memory model (at the physical addressing level) still provides the greatest flexibility for implementing this type of memory management.

Memory models

Most modern memory models fall into one of three categories:

Flat unpaged memory model

  • Simple interface for programmers, clean design
  • Greatest flexibility due to uniform access speed (segmented memory page switches usually incur varied latency due to longer accesses of other pages, either due to extra CPU logic in changing page, or hardware requirements)
  • Minimum hardware and CPU real estate for simple controller applications[clarification needed]
  • Maximum execution speed, as there is no need to access auxiliary data structures such as a segment or page table in RAM
  • Not suitable for general computing or multitasking operating systems

Paged memory model

  • Suitable for multitasking, general operating system design, resource protection and allocation
  • Suitable for virtual memory implementation
  • More CPU real estate, somewhat lower speed
  • More complex to program
  • Rigid page boundaries, not always the most memory efficient
  • This memory model is required when using Physical Address Extension (PAE) in Pentium Pro and later x86 CPUs to support 36-bit physical addresses to address more than 4GB of physical memory.

x86 segmented memory model

  • Similar to paged memory, but paging is achieved by the implicit addition of two relatively shifted registers: segment:offset
  • Variable page boundaries, more efficient and flexible than the paged memory model
  • Quite complex and awkward from a programmer's point of view
  • More difficult for compilers
  • Pages can overlap / poor resource protection and isolation
  • Many to one address translation correspondence: Many segment:offset combinations resolve to the same physical address
  • Greater chance of programming errors
  • Implemented in the original Intel 8086, 8088, 80186, 80286, and supported by 80386 and all subsequent x86 machines through to present day Pentium and Core 2 processors. This memory model has remained ever since in the x86 machines, which now provide multi-mode operation and rarely operate in the compatible segmented mode.[clarification needed] See x86 memory segmentation for details.
  • saves RAM by moving the segment address, this allows short jumps that require fewer bytes.

Within the x86 architectures, when operating in the real mode (or emulation), physical address is computed as:[2]

Address = 16 × segment + offset

(I.e., the 16-bit segment register is shifted left by 4 bits and added to a 16-bit offset, resulting in a 20-bit address.)

See also

References

  1. ^ Gonzalez, Antonio; Latorre, Fernando; Magklis, Grigorios (2011). Processor Microarchitecture: An Implementation Perspective. Morgan & Claypool Publishers. p. 72. ISBN 9781608454525.
  2. ^ General description of Real Mode "The physical address can be calculated as Value_in_segment_register
    • 16 + Value_in_offset_register."

Read other articles:

Gedung Gereja Koinonia (Bethelkerk) pada tahun 1910. Gereja Koinonia adalah gereja tua di Jakarta yang terletak di Jalan Matraman Raya No. 216, tepat di dekat persimpangan Jalan Jatinegara Barat dan Jalan Jatinegara Timur. Gereja ini merupakan salah satu gereja peninggalan zaman kolonial di Indonesia. Sejarah Pada saat kota Jayakarta direbut oleh Belanda, Pangeran Jayakarta Wijayakrama menyelamatkan diri ke arah tenggara kota. Tempat pengasingan tersebut merupakan daerah hutan yang dipenuhi o...

 

Not to be confused with the Orb. English electronic music duo OrbitalOrbital in concert at Poland in 2012Background informationOriginOtford, Kent, EnglandGenres Electronic techno trance IDM ambient breakbeat Years active1989–20042009–20142017–presentLabelsFFRRInternalMembersPhil HartnollPaul HartnollWebsiteorbitalofficial.com Orbital are an English electronic music duo from Otford, Kent, England, consisting of brothers Phil and Paul Hartnoll. The band's name is taken from Greater London...

 

Presiden Republik SenegalPetahanaMacky Sallsejak 2 April 2012Masa jabatan5 tahun, dapat dipilih kembali 1 kali lagi.Pejabat perdanaLéopold Sédar SenghorDibentuk6 September 1960 Presiden Senegal adalah kepala negara dan kepala pemerintahan di Republik Senegal. Sesuai dengan reformasi konstitusi tahun 2001, dan sejak referendum yang berlangsung pada tanggal 20 Maret 2016, presiden dipilih untuk masa jabatan 5 tahun, dan dapat dipilih kembali 1 kali lagi. Daftar Presiden Berikut adalah da...

Chemical compound Estradiol mustardClinical dataOther namesNSC-112259; Estradiol 3,17β-bis(4-(bis(2-chloroethyl)amino)phenyl)acetateDrug classChemotherapeutic agent; Estrogen; Estrogen esterIdentifiers IUPAC name [(8R,9S,13S,14S,17S)-3-[2-[4-[Bis(2-chloroethyl)amino]phenyl]acetyl]oxy-13-methyl-6,7,8,9,11,12,14,15,16,17-decahydrocyclopenta[a]phenanthren-17-yl] 2-[4-[bis(2-chloroethyl)amino]phenyl]acetate CAS Number22966-79-6PubChem CID31586ChemSpider29294UNIIGEO3F3A4K1ChEBICHEBI:82520ChEMBLCh...

 

Artikel ini membahas mengenai bangunan, struktur, infrastruktur, atau kawasan terencana yang sedang dibangun atau akan segera selesai. Informasi di halaman ini bisa berubah setiap saat (tidak jarang perubahan yang besar) seiring dengan penyelesaiannya. Conrad DubaiInformasi umumLokasiDubai, Uni Emirat ArabPerkiraan rampung2010TinggiAtap255 m (837 ft)Data teknisJumlah lantai51Desain dan konstruksiArsitekWS Atkins & Partners Conrad Dubai merupakan sebuah proyek menara hotel bertingkat 51 di...

 

Graffiti antisemiti sulle vetrine dei negozi a Oslo nel 1941. L'indirizzo è chiamato Glitne-gården da alcuni.[1] L'Olocausto in Norvegia si verificò durante l'occupazione nazista dal 9 aprile 1940. Nel 1942 vivevano in Norvegia circa 2.173 ebrei, di questi almeno 775 furono arrestati, detenuti e/o deportati. Più della metà dei norvegesi morti nei campi di concentramento in Germania furono ebrei:[2] 742 furono assassinati all'interno dei campi e 23 ebrei morirono a causa d...

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: 35M rifle – news · newspapers · books · scholar · JSTOR (December 2012) (Learn how and when to remove this template message) Bolt-action service rifle 35M Puska(35M Rifle) 35M Rifle from the Swedish Army Museum.TypeBolt-action service riflePlace of or...

 

1999 film by Barry W. Blaustein For the TV episode, see Beyond the Mat (Supernatural). This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: Beyond the Mat – news · newspapers · books · scholar · JSTOR (May 2016) (Learn how and when to remove this template message) Beyond the MatTheatrical release posterDirected b...

 

Spray that delivers medications locally in the nasal cavities or systemically This article needs more reliable medical references for verification or relies too heavily on primary sources. Please review the contents of the article and add the appropriate references if you can. Unsourced or poorly sourced material may be challenged and removed. Find sources: Nasal spray – news · newspapers · books · scholar · JSTOR (November 2017) Nasal sprayActuation o...

Football in ScotlandSeason1926–27 ← 1925–26 1927–28 → 1926–27 in Scottish footballDivision One championsRangersDivision Two championsBo'nessScottish Cup winnersCelticJunior Cup winnersRutherglen GlencairnScotland national team1927 BHC The 1926–27 season was the 54th season of competitive football in Scotland and the 37th season of the Scottish Football League.[1] In addition, the Scotland national amateur team (under the auspices of the SFA) played its...

 

Irreligious CroatiansWithout a god, without a master, slogan of atheistic campaign from 2009Total populationPopulation in Croatia: 3,871,833Not religious or spiritual: 247,510 (2021)Regions with significant populationsIstria County, Primorje-Gorski Kotar County, Zagreb, Split-Dalmatia County Irreligion in Croatia pertains to atheism, agnosticism, and lack of religious affiliation in Croatia. Even though the 2011 census showed that only 4.57% of Croats considered themselves irreligious, Gallup...

 

Sports season1978–79 AHL seasonLeagueAmerican Hockey LeagueSportIce hockeyRegular seasonF. G. Teddy Oke TrophyMaine MarinersSeason MVPRocky SaganiukTop scorerBernie JohnstonPlayoffsChampionsMaine Mariners  Runners-upNew Haven NighthawksAHL seasons← 1977–781979–80 → The 1978–79 AHL season was the 43rd season of the American Hockey League. The league inaugurated the Ken McKenzie Award, for the most outstanding marketing executive, showing its commitment to marke...

2020年夏季奥林匹克运动会波兰代表團波兰国旗IOC編碼POLNOC波蘭奧林匹克委員會網站olimpijski.pl(英文)(波兰文)2020年夏季奥林匹克运动会(東京)2021年7月23日至8月8日(受2019冠状病毒病疫情影响推迟,但仍保留原定名称)運動員206參賽項目24个大项旗手开幕式:帕维尔·科热尼奥夫斯基(游泳)和马娅·沃什乔夫斯卡(自行车)[1]闭幕式:卡罗利娜·纳亚(皮划艇)&#...

 

King of Commagene (died 20 BC) Mithridates IIRelief of Mithridates II and his sister Laodice at the Tumulus of Karakuş, TurkeyKing of CommageneReign31 BC – 20 BC(18 years)PredecessorAntiochus I TheosSuccessorMithridates IIIDied20 BCRome, Roman EmpireIssueMithridates III of CommageneNamesMithridates II Antiochus Epiphanes Philorhomaeus Philhellen MonocritesHouseOrontid dynastyFatherKing Antiochus I Theos of CommageneMotherIsias Mithridates II Antiochus Epiphanes Philorhomaeus Philhellen Mon...

 

Ado Onaiwu Informasi pribadiNama lengkap Ado OnaiwuTanggal lahir 8 November 1995 (umur 28)Tempat lahir Prefektur Saitama, JepangPosisi bermain PenyerangKarier senior*Tahun Tim Tampil (Gol)2014- JEF United Chiba * Penampilan dan gol di klub senior hanya dihitung dari liga domestik Ado Onaiwu (lahir 8 November 1995) adalah pemain sepak bola asal Jepang. Karier Ado Onaiwu pernah bermain untuk JEF United Chiba. Pranala luar (Jepang) Profil dan statistik di situs web resmi J. League Data Sit...

Association football league in England For the professional baseball league, see National League (baseball). Football Conference redirects here. For other uses, see Football Conference (disambiguation). Football leagueNational LeagueFounded1979; 45 years ago (1979) (as Alliance Premier League)2004; 20 years ago (2004) (North & South)CountryEngland (72 clubs)DivisionsNational LeagueNational League North and SouthNumber of teams24 National League24 North ...

 

Method of fishing by hand Trout tickling is the art of rubbing the underbelly of a trout with fingers.[1] If done properly, the trout will go into a trance after a minute or so, and can then easily be retrieved and thrown onto the nearest bit of dry land.[2] History Trout tickling has been practiced for many centuries. It is mentioned in Shakespeare's comedy Twelfth Night, where it is used as a metaphor for bamboozlement by Olivia's servant Maria, who is about to play a vengef...

 

American politician This article is about the mayor of Detroit, Michigan. For the shipwreck in Lake Erie, see SS John Pridgeon Jr. John Pridgeon Jr.Mayor of DetroitIn office1888–1889Preceded byMarvin H. ChamberlainSucceeded byHazen S. Pingree Personal detailsBorn(1852-08-01)August 1, 1852Detroit, MichiganDiedMarch 16, 1929(1929-03-16) (aged 76)Cambridge, MassachusettsSpouses Cora Edgar ​ ​(m. 1874; div. 1911)​ Blanche Pridgeon Cate ​...

Territorio africano della prima guerra mondialeparte della prima guerra mondialeL'Africa nel 1913Data3 agosto 1914 - 23 novembre 1918 LuogoCamerun, Togo, Namibia, Tanzania, Zambia, Mozambico EsitoVittorie alleate in tutte le colonie, con l'eccezione dell'Africa Orientale (vittoria tattica tedesca) Schieramenti Impero britannico  Sudafrica  Australia Francia Belgio Italia Portogallo Germania Impero ottomanoSenussiRibelli marocchiniBoeri Voci di battaglie...

 

Javi MorenoNazionalità Spagna Altezza178 cm Peso78 kg Calcio RuoloAllenatore (ex attaccante) Termine carriera1º novembre 2009 - giocatore CarrieraGiovanili 1994-1995 Barcellona Squadre di club1 1995-1996 Barcellona B10 (5)1996-1997 Córdoba15 (0)1997 Yeclano16 (6)1997-1998 Alavés10 (1)1998-1999 Numancia38 (18)1999-2001 Alavés71 (30)2001-2002 Milan16 (2)2002-2004 Atlético Madrid29 (5)2004→  Bolton8 (0)2004-2005 Real Saragozza18...