Presentation is loading. Please wait.

Presentation is loading. Please wait.

Atmintinė.

Similar presentations


Presentation on theme: "Atmintinė."— Presentation transcript:

1 Atmintinė

2 1 S R Q Statinės atmintinės ląstelė (trigeris)

3 Trigeris (Loginės ir principinė scemos)

4 A six-transistor CMOS SRAM cell.

5 Principle of operation of DRAM read,
Valdymas (adresai) Duomenys Dinaminės atmintinės ląstelė Principle of operation of DRAM read, for simple 4 by 4 array.

6 Principle of operation of DRAM read, for simple 4 by 4 array.

7 Kuo žemesnė hierarchijos pakopa: • Vieno bito kaina mažėja
Kuo žemesnė hierarchijos pakopa: • Vieno bito kaina mažėja. • Didėja talpa. • Didėja kreipties trukmė. • Mažėja procesoriaus kreipčių į atmintį

8 Dynamic random access memory (DRAM) is a type of random access memory that stores each bit of data in a separate capacitor within an integrated circuit. Since real capacitors leak charge, the information eventually fades unless the capacitor charge is refreshed periodically. Because of this refresh requirement, it is a dynamic memory as opposed to SRAM and other static memory. Its advantage over SRAM is its structural simplicity: only one transistor and a capacitor are required per bit, compared to six transistors in SRAM. This allows DRAM to reach very high density. Like SRAM, it is in the class of volatile memory devices, since it loses its data when the power supply is removed.

9 Non-volatile random access memory (NVRAM) is the general name used to describe any type of random access memory which does not lose its information when power is turned off. This is in contrast to the most common forms of random access memory today, DRAM and SRAM, which both require continual power in order to maintain their data. NVRAM is a subgroup of the more general class of non-volatile memory types, the difference being that NVRAM devices offer random access, as opposed to sequential access like hard disks. The best-known form of NVRAM memory today is flash memory. Some claim flash memory to be a truly "universal memory", offering the performance of the best SRAM devices with the non-volatility of Flash.

10 ROM was the earliest solution (being able to be written to only once, when the chip was initially designed). ROMs consist of a series of diodes permanently wired to return the required data, the diodes being built in this configuration when they are being fabricated. PROM improved on this design, allowing the chip to be written to electrically by the end-user. PROM consists of a series of diodes that are initially all set to a single value, "1" for instance. By applying higher power than normal, a selected diode can be "burned out" (like a fuse), thereby permanently setting that bit to "0". PROM was a boon to companies who wished to update the contents with new revisions, or alternately produce a number of different products using the same chip. E.g., PROM was widely used for game console cartridges in the 1980s. For those who required real RAM-like performance and non-volatility typically have to use conventional RAM devices and a battery backup. This was a common solution in earlier computer systems, which used a small amount of memory powered by a watch "button" battery for storing basic setup information like the selected boot volume.

11 The introduction of the floating-gate transistor, which led to the introduction of erasable programmable read-only memory, or EPROM. EPROM consists of a grid of transistors whose base terminal (the "switch") is protected by a high-quality insulator. By "pushing" electrons onto the base with the application of higher-than-normal power, the electrons become trapped on the far side of the insulator, thereby permanently switching the transistor "on" ("1"). EPROM can be re-set to the "base state" (all "1"s or "0"s, depending on the design) by applying ultraviolet light (UV). The UV photons have enough energy to push the electrons through the insulator and return the base to a ground state. At that point the EPROM can be re-written from scratch. An improvement on EPROM, EEPROM, soon followed. The extra "E" stands for electrically, referring to the ability to reset EEPROM using electricity instead of UV, making the devices much easier to use in practice. The bit are re-set with the application of even higher power through the other terminals of the transistor (source and drain). This high power pulse basically sucks the electrons through the insulator, returning it to the ground state. This process has the disadvantage of mechanically degrading the chip, however, so memory systems based on floating-gate transistors generally have short write-lifetimes, on the order of 105 writes to any particular bit.

12 Flash memory stores information in an array of floating-gate transistors, called "cells". In traditional single-level cell (SLC) devices, each cell stores only one bit of information. Some newer flash memory, known as multi-level cell (MLC) devices, can store more than one bit per cell by choosing between multiple levels of electrical charge to apply to the floating gates of its cells. Programming a NOR memory cell (setting it to logical 0), via hot-electron injection. Erasing a NOR memory cell (setting it to logical 1), via quantum tunneling.

13

14 Flash Memory Basics Flash memory is a type of EEPROM chip
Flash Memory Basics Flash memory is a type of EEPROM chip. It has a grid of columns and rows with a cell that has two transistors at each intersection (see image below). The two transistors are separated from each other by a thin oxide layer. One of the transistors is known as a floating gate, and the other one is the control gate. The floating gate's only link to the row, or wordline, is through the control gate. As long as this link is in place, the cell has a value of 1. To change the value to a 0 requires a curious process called Fowler-Nordheim tunneling. Tunneling and Erasing Tunneling is used to alter the placement of electrons in the floating gate. An electrical charge, usually 10 to 13 volts, is applied to the floating gate. The charge comes from the column, or bitline, enters the floating gate and drains to a ground. This charge causes the floating-gate transistor to act like an electron gun. The excited electrons are pushed through and trapped on other side of the thin oxide layer, giving it a negative charge. These negatively charged electrons act as a barrier between the control gate and the floating gate. A special device called a cell sensor monitors the level of the charge passing through the floating gate. If the flow through the gate is greater than 50 percent of the charge, it has a value of 1. When the charge passing through drops below the 50-percent threshold, the value changes to 0. A blank EEPROM has all of the gates fully open, giving each cell a value of 1. Tunneling and Erasing Tunneling is used to alter the placement of electrons in the floating gate. An electrical charge, usually 10 to 13 volts, is applied to the floating gate. The charge comes from the column, or bitline, enters the floating gate and drains to a ground. This charge causes the floating-gate transistor to act like an electron gun. The excited electrons are pushed through and trapped on other side of the thin oxide layer, giving it a negative charge. These negatively charged electrons act as a barrier between the control gate and the floating gate. A special device called a cell sensor monitors the level of the charge passing through the floating gate. If the flow through the gate is greater than 50 percent of the charge, it has a value of 1. When the charge passing through drops below the 50-percent threshold, the value changes to 0. A blank EEPROM has all of the gates fully open, giving each cell a value of 1. The electrons in the cells of a Flash-memory chip can be returned to normal ("1") by the application of an electric field, a higher-voltage charge. Flash memory uses in-circuit wiring to apply the electric field either to the entire chip or to predetermined sections known as blocks. This erases the targeted area of the chip, which can then be rewritten. Flash memory works much faster than traditional EEPROMs because instead of erasing one byte at a time, it erases a block or the entire chip, and then rewrites it. You may think that your car radio has Flash memory, since you are able to program the presets and the radio remembers them. But it is actually using Flash RAM. The difference is that Flash RAM has to have some power to maintain its contents, while Flash memory will maintain its data without any external source of power. Even though you have turned the power off, the car radio is pulling a tiny amount of current to preserve the data in the Flash RAM. That is why the radio will lose its presets if your car battery dies or the wires are disconnected.

15 Toshiba announced NAND flash at ISSCC in 1989 (invented by Dr
Toshiba announced NAND flash at ISSCC in 1989 (invented by Dr. Fujio Masuoka). It has faster erase and write times, and requires a smaller chip area per cell, thus allowing greater storage densities and lower costs per bit than NOR flash; it also has up to ten times the endurance of NOR flash. However, the I/O interface of NAND flash does not provide a random-access external address bus. Rather, data must be read on a block-wise basis, with typical block sizes of hundreds to thousands of bits. This makes NAND flash unsuitable to replace program ROM, since most microprocessors and microcontrollers cannot directly execute programs stored in memory without random access; NAND flash is similar to other secondary storage devices such as hard disks and optical media, and is thus very suitable for use in mass-storage devices such as memory cards. The first NAND-based removable media format was SmartMedia, and many others have followed, including MultiMediaCard, Secure Digital, Memory Stick and xD-Picture Card. A new generation of memory card formats, including RS-MMC, miniSD and microSD, and Intelligent Stick, feature extremely small form factors; the microSD card has an area of just over 1.5 cm², with a thickness of less than 1 mm.

16 The basis of Flash RAM is identical to EEPROM, and differs largely in internal layout.
Flash allows its memory to be written only in blocks, which greatly simplifies the internal wiring and allows for higher densities. Areal density is the main determinant of cost in most computer memory systems, and due to this Flash has evolved into one of the lowest cost solid-state memory devices available. Starting around 2000, demand for ever-greater quantities of Flash have driven manufacturers to use only the latest fabrication systems in order to increase density as much as possible.

17 Flash memory is non-volatile computer memory that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards, and USB flash drives (thumb drives, handy drive, memory stick, flash stick, jump drive) for general storage and transfer of data between computers and other digital products. It is a specific type of EEPROM that is erased and programmed in large blocks; in early flash the entire chip had to be erased at once. Flash memory costs far less than byte-programmable EEPROM and therefore has become the dominant technology wherever a significant amount of non-volatile, solid-state storage is needed. Examples of applications include PDAs and laptop computers, digital audio players, digital cameras and mobile phones. It has also gained some popularity in the game console market, where it is often used instead of EEPROMs or battery-powered static RAM (SRAM) for game save data. Flash memory is non-volatile, which means that it does not need power to maintain the information stored in the chip. In addition, flash memory offers fast read access times (although not as fast as volatile DRAM memory used for main memory in PCs) and better kinetic shock resistance than hard disks. These characteristics explain the popularity of flash memory for applications such as storage on battery-powered devices. Another feature of flash memory is that when packaged in a "memory card", it is enormously durable, being able to withstand intense pressure, extremes of temperature and immersion in water. Although technically a type of EEPROM, the term "EEPROM" is generally used to refer specifically to non-flash EEPROM which is erasable in small blocks, typically bytes. Because an erase cycle is slow, the large size of a flash ROM's erase block can make programming it faster than old-style EEPROM. Flash memory is non-volatile computer memory that can be electrically erased and reprogrammed. It is a technology that is primarily used in memory cards, and USB flash drives (thumb drives, handy drive, memory stick, flash stick, jump drive) for general storage and transfer of data between computers and other digital products. It is a specific type of EEPROM that is erased and programmed in large blocks; in early flash the entire chip had to be erased at once. Flash memory costs far less than byte-programmable EEPROM and therefore has become the dominant technology wherever a significant amount of non-volatile, solid-state storage is needed. Examples of applications include PDAs and laptop computers, digital audio players, digital cameras and mobile phones. It has also gained some popularity in the game console market, where it is often used instead of EEPROMs or battery-powered static RAM (SRAM) for game save data. Flash memory is non-volatile, which means that it does not need power to maintain the information stored in the chip. In addition, flash memory offers fast read access times (although not as fast as volatile DRAM memory used for main memory in PCs) and better kinetic shock resistance than hard disks. These characteristics explain the popularity of flash memory for applications such as storage on battery-powered devices. Another feature of flash memory is that when packaged in a "memory card", it is enormously durable, being able to withstand intense pressure, extremes of temperature and immersion in water. Although technically a type of EEPROM, the term "EEPROM" is generally used to refer specifically to non-flash EEPROM which is erasable in small blocks, typically bytes. Because an erase cycle is slow, the large size of a flash ROM's erase block can make programming it faster than old-style EEPROM.

18

19 Atmintinė ir adresavimas
Viena iš svarbiausių kompiuterio ir jo procesoriaus charskteristikų – atmintinės adresavimo erdvė nusakoma adresų registro dydžiu (bitais) arba adresuojamos atminties (ląstelių) kiekiu (Baitais) 8, , , , , b 256, , , , , 256B, 64 kB, 1 MB, MB, GB, B

20 Atmintinė - ne tik vidinė

21 Svarbiausios atminties charakteristikos
Išdėstymas Procesoriaus registrai. Vidinė  (pagrindinė, darbinė). Išorinė (antrinė) Sparta Kreipimosi laikas. Ciklo laikas. Transliavimo (siuntimo) greitis Talpa Žodis. Tam tikras žodžių skaičius. Baitas Fizinis tipas Puslaidininkinė. Magnetinių ir optinių paviršių Siuntimo vienetai Žodis. Blokas Fizinės charakteristikos Priklausanti nuo elektros energijos (operatyvioji) / Nuo elektros energijos nepriklausanti (pastovioji). Trinioji/netrinioji Kreipties metodas Nuoseklioji kreiptis. Tiesioginiė kreiptis. Laisvoji kreiptis. Asociatyvioji kreiptis

22 Tarp trijų pagrindinių atminties charakteristikų – kainos, talpos ir kreipties laiko galioja tokie santykiai:     • Kuo mažesnė kreipties trukmė, tuo didesnė bito kaina.     • Kuo didesnė talpa, tuo mažesnė bito kaina.     • Kuo didesnė talpa, tuo ilgesnė kreipties trukmė.

23 Kuo žemesnė hierarchijos pakopa: • Vieno bito kaina mažėja
Kuo žemesnė hierarchijos pakopa: • Vieno bito kaina mažėja. • Didėja talpa. • Didėja kreipties trukmė. • Mažėja procesoriaus kreipčių į atmintį

24 Puslaidininkinės atminties tipai
Atminties tipas Kategorija Išvalymas Rašymo mechanizmas Priklausomybė nuo elektros energijos laisvosios kreipties atmintis (RAM) skaitymo ir rašymo atmintis elektra, baitų lygmeniu elektrinis (statinė arba dinaminė) priklausoma pastovioji atmintis (tik skaitoma) (ROM) šablonai (Masks) nepriklausoma programuojamoji pastovioji atmintis (PROM) tik skaitoma atmintis neįmanomas trinioji (Erasable) programuojamoji atmintis (EPROM) daugiausia skaitoma atmintis (Read mostly memory) ultravioletine  šviesa, mikroschemos lygmeniu „Fleš“ (Flash) atmintis elektra, duomenų blokų lygmeniu elektra išvaloma programuo-jamoji atmintis (EEPROM)

25 Pagrindinis puslaidininkinės atminties elementas yra atminties ląstelė.
Nors įvairių technologijų daug, visos puslaidininkinės atminties ląstelės turi keletą bendrų savybių: ląstelė gali būti vienoje iš dviejų stabilių loginių būsenų, taikytinų binariniam 1 arba 0 atvaizduoti. įrašyta (nors vieną kartą) – nustatytos į tam tikrą loginę būseną. nuskaityta siekiant sužinoti jų loginę būseną.

26 Čia vienu metu gali būti skaitomi arba rašomi 4 bitai
Čia vienu metu gali būti skaitomi arba rašomi 4 bitai. Todėl atminties masyvas sudarytas iš keturių kvadratinių matricų 2048 x 2048 elementų. Bendruoju atveju galimas įvairus fizinis elementų išdėstymas. Tačiau bet kuriuo atveju masyvo elementai sujungti horizontaliomis (eilutės) ir vertikaliomis (stulpeliai) linijomis. Kiekviena horizontali linija sujungta su eilutės kiekvienos ląstelės išrinkimo kontaktu; kiekviena vertikali linija – su stulpelio kiekvienos ląstelės duomenų įvesties/išvesties kontaktu.

27 Klaidų korekcija atminties sistemoje     
Puslaidininkinėje atminties sistemoje kartais pasitaiko klaidų. Jos paprastai skiriamos į fizinius pažeidimus ir klaidas, atsirandančias dėl programinės įrangos sutrikimų. Pažeidimas – tai pastovus fizinis defektas, dėl kurio atminties ląstelė ar ląstelės negali patikimai saugoti duomenų, nuolat būna vienoje iš būsenų – 1 arba 0 – arba spontaniškai persijungia iš 1 į 0. Fiziniai pažeidimai gali atsirasti dėl nepalankių aplinkos sąlygų, gamybos defektų arba netinkamai naudojant mikroschemas. Klaida (soft error) – tai atsitiktinis įvykis, kuris pakeičia vienos ar kelių atminties ląstelių turinį, fiziškai nepažeisdamas atminties. Klaidos gali atsirasti dėl maitinimo problemų, alfa spinduliuotės dalelių ir kt. Alfa dalelės atsiranda dėl radioaktyviojo spinduliavimo ir yra dažnas reiškinys, nes nedidelis radioaktyvumas aptinkamas beveik visose medžiagose. Natūralu, kad pažeidimai ir klaidos yra nepageidautini, todėl didesnėje šiuolaikinių atminties sistemų dalyje yra įtaisomos klaidų aptikimo ir korekcijos priemonės.     

28 pav. labai apibendrintai parodyta, kaip vyksta šis procesas
pav. labai apibendrintai parodyta, kaip vyksta šis procesas. Kai duomenys rašomi į atmintį, kartu atliekami specialūs skaičiavimai, pav. pažymėti f funkcija. Atliekant šiuos skaičiavimus generuojamas tam tikras kontrolės kodas. Ir kodas, ir duomenys kartu išsaugomi atmintyje, t. y. jei reikia saugoti M bitų duomenų žodį ir K kontrolės bitų, bendras saugomo žodžio ilgis yra M + K bitų.

29 Kai atmintyje saugomas žodis yra iš jos skaitomas, galimoms klaidoms aptikti ir ištaisyti naudojamas minėtas kodas. Nauja K kodo bitų seka generuojama iš M duomenų bitų ir palyginama su atmintyje saugomais kodo bitais. Šio palyginimo rezultatai gali būti tokie:        Klaidų neaptikta. Saugomi duomenų bitai išsiunčiami pagal užklausą.        Aptikta klaida, kurią galima ištaisyti. Duomenų bitai ir klaidų korekcijos bitai siunčiami į korektorių, kuris pateikia teisingą M bitų seką.        Aptikta klaida, kurios ištaisyti neįmanoma. Siunčiamas pranešimas apie įvykį. Kodai, kuriuos taikant galima tai daryti, vadinami klaidų kontrolės kodais. Kodas apibūdinamas klaidų, kurias gali ištaisyti arba aptikti, skaičiumi.

30 The Spectrums memory map is very simple:
ROM is paged into address 0x x3fff RAM is paged into 0x x7fff on the 16K model, with the extra 32k if fitted paged into 0x xffff. There is but one IO port on a base Spectrum, 0xfe 0x7fff 0x4000 0x3fff 0x0000 Bazinis IO adresas žemiausias IO grupės adresas

31 0000:0000 0000:0001 . 0000:FFFF 0001:0000 0001:0001

32 Pagr atmintinė (Conventional) 10x64kB = 640kB
F E D C B A 0600 0500 0400 0000 ROM BIOS Video RAM Pagr atmintinė (Conventional) 10x64kB = 640kB Dos duomenys ROM BIOS kintamieji ir duomenys Pertraukties vektoriai 256x4B (2word) 1024B I x86 mP atmintinės paskirstymas

33 Extended HMA kB Expanded Conventional

34 I x86 mP atmintinės paskirstymas
F E D C B A 0600 0500 0400 0000 ROM BIOS Video RAM Pagr atmintinė (Conventional) 10x64kB = 640kB Dos duomenys ROM BIOS kintamieji ir duomenys Pertraukties vektoriai 256x4B (2word) 1024B I x86 mP atmintinės paskirstymas

35 I x86 mP atmintinės paskirstymas 1 M
F E D C B A 0600 0500 0400 0000 ROM BIOS Video RAM Pagr atmintinė (Conventional) 10x64kB = 640kB Dos duomenys ROM BIOS kintamieji ir duomenys Pertraukties vektoriai 256x4B (2word)

36 Extended HMA kB Expanded Conventional

37

38 How can I tell how much RAM is being used by application processes and various operating system functions? It is not possible to get a complete accounting of RAM usage on a Windows 2000, but you can get reasonably close. RAM usage by various OS functions is measured by the following five Memory Object counters: Pool Nonpaged Bytes: these represent allocations directed to the nonpaged pool, which is a set virtual memory pages that always remain resident in RAM. (These are nonpageable bytes.) Device drivers and the OS use the nonpaged pool to store data structures that must stay in physical memory and can never be paged out to disk. (For example, the TCP/IP driver must allocate some amount of nonpaged memory for every TCP/IP connection that is active on the computer for data structures that are required during processing of network adaptor interrupts when page faults cannot be tolerated.) Pool Paged Resident Bytes: Most virtual memory pages that are acquired in the Operating System range of virtual addresses can be paged out. The Pool Paged Resident Bytes represent memory locations from the pageable pool that currently reside in RAM. System Cache Resident Bytes: the system’s file cache occupies a reserved range of virtual memory addresses, some of which may currently reside in RAM. (Cached file segments can also be non-resident, in which case they must be fetched from disk when they are referenced by executing processes.) System Cache Resident Bytes represents segments of the file cache that are currently resident in RAM. System Code Resident Bytes: memory locations associated with system code that is currently resident in RAM. System Driver Resident Bytes: memory locations associated with device driver code that is currently resident in RAM. These five Counters account for RAM usage of virtual memory associated with operating system (and device driver) functions. As discussed above, Available Bytes represents free RAM that is not allocated to any OS function or to any executing process. Once you know how much OS function are currently using, it ought to be a simple matter to account for RAM usage completely by factoring in the Working Set Bytes of various executing processes, as follows: Process(_Total) Working Set Bytes = Sizeof(RAM) – (Available Bytes + Pool Nonpaged Bytes + Pool Paged Resident Bytes + System Cache Resident Bytes + System Code Resident Bytes + System Driver Resident Bytes) However, resident pages associated with shared DLLs (e.g., DLLs like comsvcs.dll, mfc42.dll, msvbvm60.dll, etc.) are counted in each and every process Working Set that references a shared DLL. Because these resident pages are counted multiple times, Process(_Total) Working Set bytes usually reports a higher number of resident pages than are actually in use. In other words, Sizeof(RAM) < Process(_Total) Working Set Bytes + Available Bytes + Pool Nonpaged Bytes + Pool Paged Resident Bytes + System Cache Resident Bytes + System Code Resident Bytes + System Driver Resident Bytes Because the numbers do not add up as they seemingly ought to, we prefer creating a report like Figure 1 above that charts the six system Memory counters (including Available Bytes) and compares their sum to the amount of installed RAM. Process working sets fill the amount of RAM left over after you have accounted for these six counters, even though you cannot pin down precisely which how much memory each process occupies.

39

40 RAM Allocation with Microsoft Windows XP Professional (32 & 64-bit)
Increasing workstation performance and RAM affordability have enabled more and more users to push the limits of 32-bit computing. This paper discusses those limits with respect to RAM allocation when using Microsoft Windows XP Professional on x86-based computers. Specifically, the 32-bit version of XP Professional limits available RAM to noticeably less than 4 GB while Microsoft Windows XP Professional x64 Edition eliminates this barrier. Microsoft Windows XP Professional, designed as a 32-bit OS, supports an address range of up to 4 GB for virtual memory addresses and up to 4 GB for physical memory addresses. Because the physical memory addresses are sub-divided to manage both the computer’s PCI memory address range (also known as MMIO) and RAM, the amount of available RAM is always less than 4 GB. The PCI memory addresses starting down from 4 GB are used for things like the BIOS, IO cards, networking, PCI hubs, bus bridges, PCI-Express, and video/graphics cards. The BIOS takes up about 512 KB starting from the very top address. Then each of the other items mentioned are allocated address ranges below the BIOS range. The largest block of addresses is allocated for today’s high performance graphics cards which need addresses for at least the amount of memory on the graphics card. The net result is that a high performance x86-based computer may allocate 512 MB to more than 1 GB for the PCI memory address range before any RAM (physical user memory) addresses are allocated. RAM starts from address 0. The BIOS allocates RAM from 0 up to the bottom of the PCI memory addresses mentioned above, typically limiting available RAM to between 3 GB and 3.4 GB.

41 IRQ IRQ (Interrupt ReQust – pertraukimo užklauas) – vieno kompiuterio mazgo signalas reikalaujantis procesoriaus dėmesio šitam mazgui, atsiranda atsitikus tam tikram įvykiui (Pvz:paspaudus klavišą, baigus įrašymą į diską ir t.t). PC turi 15 IRQ, kurių dalis naudojama vidiniams sisteminės plokštės valdikliams, o likę naudojami standartiniams adapteriams arba visai nenaudojami. 0-sisteminis laikmatis; 1-klaviaitūros kontroleris; 2-grįžtamojo kadro signalas (EGA\VGA); 3-paprastai COM2/COM4; 4-paprastai COM1/COM3; 5-HDD kontroleris (XT), paprastai laisvas AT; 6-FDD kontroleris; 7-LPT1, tačiau dauguma LPT kontrolerių jo nenaudoja; 8-realaus laiko laikrodis su autoniminiu maitinimu (RTC); 9-lygiagretus IRQ2; 10-nenaudojamas; 11-nenaudojamas; 12-paprastai PS/2 tipo pelės kontroleris; 13- matematinis koprocesorius; 14-paprastai IDE HDD kontroleris (pirmas kanalas); 15- tas pats tiktai 2 kanalas.

42

43 Programinės ir pertraukčių valdomos įvesties/išvesties trūkumai
      Pertraukčių valdoma įvestis/išvestis yra efektyvesnė už paprastąją programinę įvestį/išvestį. Tačiau ji taip pat reikalauja aktyvaus CPĮ įsikišimo į keitimąsi duomenimis tarp atminties ir įvesties/išvesties modulio procesą. Čia visų duomenų siuntimo kelias eina per CPĮ. Tiek programinis, tiek pertraukčių valdomas įvesties/išvesties metodai turi du pagrindinius trūkumus: 1. CPĮ galimybės testuoti ir aptarnauti periferinius įrenginius riboja įvesties/išvesties keitimosi duomenimis spartą. 2. CPĮ įtraukiamas į įvesties/išvesties proceso valdymą ir kiekvienoje įvesties/išvesties operacijoje reikia įvykdyti labai daug instrukcijų.       Kai siunčiami dideli duomenų masyvai, reikalingas efektyvesnis metodas. Tam geriau tinka tiesioginė kreiptis į atmintį (Direct Memory Access – DMA).

44 DMA

45       DMA metodui įgyvendinti reikia papildomo modulio sisteminėje magistralėje. DMA modulis „pavaduoja“ CPĮ ir perima iš jo kompiuterizuotos sistemos valdymą: Kai CPĮ turi skaityti arba rašyti duomenų bloką, jis siunčia DMA moduliui komandą su tokia informacija: •  Vykdomo veiksmo pobūdis – skaityti (priiminėti) ar rašyti (siųsti) duomenis. •  Naudojamo periferinio įrenginio adresas. •  Atminties pozicija nuo kurios bus pradėtas skaitymas arba rašymas. •  Skaitomų arba rašomų žodžių skaičius. Toliau CPĮ tęsia pradėtą arba kokį nors kitą darbą. Vykdomąją įvesties/išvesties operaciją centrinis procesorius perduoda DMA moduliui, o pastarasis ją vykdo. DMA modulis siunčia visą duomenų bloką po vieną žodį per vieną taktą tiesiai į atmintį arba iš atminties apeidamas CPĮ. Kai visi duomenys yra persiųsti, DMA modulis centriniam procesoriui siunčia pertraukties signalą. Taigi CPĮ į keitimosi duomenimis procesą įtraukiamas tik jo pradžioje ir pabaigoje.

46

47 Įvesties/išvesties funkcijų evoliucija
   Su kompiuterizuotų sistemų evoliucija jų komponentai darosi tobulesni ir sudėtingesni. Įvesties/išvesties funkcijų evoliucija vyko tokiais etapais: 1. CPĮ tiesiogiai valdo periferinį įrenginį. Tai būdinga nesudėtingiems įrenginiams su mikroprocesoriniu valdymu. 2. Įvedamas papildomas valdiklis arba įvesties/išvesties modulis. CPĮ naudoja programinę įvestį/išvestį be pertraukčių. Šiuo etapu CPĮ šiek tiek atsiskiria nuo specifinių išorinio įrenginio interfeiso detalių. 3. Diegiamos pertrauktys. Dabar CPĮ nereikia laukti įvesties/išvesties operacijos pabaigos – padidėja CPĮ efektyvumas. 4. Įvesties/išvesties modulyje sukuriama tiesioginė kreiptis į atmintį per DMA mechanizmą. Įvesties/išvesties modulis gali siųsti duomenų bloką į atmintį arba iš jos neapkraudamas procesoriaus. Procesorius dalyvauja tik keitimosi duomenimis proceso pradžioje ir pabaigoje. 5. Įvesties/išvesties modulis tampa procesoriumi su specializuota instrukcijų sistema. Dabar CPĮ pakanka tik nurodyti, kad įvesties/išvesties procesorius iš atminties pasiimtų įvesties/išvesties programą ir ją atliktų. Įvesties/išvesties procesorius programos instrukcijas pasiima iš atminties ir jas vykdo be CPĮ įsikišimo. CPĮ tik nurodo, kad turi būti įvykdyta tam tikra įvesties/išvesties operacijų seka. Paties CPĮ darbas nutraukiamas tik tada ir tik pranešant, jog visa įvesties/išvesties operacijų seka atlikta. 6. Įvesties/išvesties modulyje sukuriama nuosavoji atmintis ir jis, tam tikra prasme, tampa lokaliuoju „kompiuteriu“. Taip sukuriama galimybė valdyti daug įvesties/išvesties įrenginių beveik nedalyvaujant CPĮ. Tokios architektūros kompiuterizuotos sistemos tinka valdyti komunikacijas tarp interaktyviųjų terminalų. Valdant minėtuosius terminalus įvesties/išvesties procesorius valdo pagrindinę užduotį.

48 Įvesties/ išvesties kanalų charakteristikos
     Įvesties/išvesties kanalas yra tolimesnis DMA koncepcijos vystymasis. Įvesties/išvesties kanalas turi galimybę vykdyti įvesties/išvesties instrukcijas ir valdyti įvesties/išvesties procesą. Kompiuterizuotoje sistemoje, kurioje yra toks įrenginys, CPĮ įvesties/išvesties instrukcijų nevykdo. Įvesties/išvesties instrukcijos saugomos pagrindinėje atmintyje ir jas vykdo specialus procesorius pačiame įvesties/išvesties kanale. Taigi CPĮ, siųsdamas į įvesties/išvesties kanalą instrukcijas ir nurodydamas pastarajam atlikti atmintyje esančią specialiąją programą, inicijuoja keitimąsi duomenimis. Ši programa specifikuoja periferinį įrenginį (arba įrenginius), atminties saugojimui skirtą sritį (arba sritis), nurodo prioritetus ir veiksmus, kuriuos reikia atlikti atsiradus tam tikroms klaidoms. Įvesties/išvesties kanalas šias instrukcijas vykdo ir valdo keitimąsi duomenimis.     Įvesties/Išvesties kanalai būna dviejų rūšių: kanalų selektoriai ir multipleksuojantys kanalai. Kanalų selektorius – kontroliuoja daug sparčių įvesties/išvesties įrenginių. Tačiau tam tikru laiko momentu gali būti priskirtas tik vienam iš šių įrenginių. Todėl įvesties/išvesties kanalas pasirenka vieną įrenginį ir vykdo keitimąsi duomenimis. Kanalų multipleksorius vienu metu gali valdyti daug įvesties/išvesties įrenginių.

49 Esant asocijuotajam su atmintimi įvesties/išvesties įrenginių adresavimui magistralėje turi būti tik viena rašymo (WRITE) komandos linija ir vieną skaitymo (READ) komandos linija.    Esant izoliuotajam adresavimo būdui, magistralėje turi būti numatytos atskiros linijos rašymo į atmintį bei skaitymo iš jos komandoms ir atskiros papildomos linijos įvesties/išvesties operacijos įvesties (INPUT) bei išvesties (OUTPUT) komandoms. Šiuo atveju, komandų linijos nurodo kam skirta komanda – atminčiai ar įvesties/išvesties įrenginiams. Tokiu būdu adresuojant komandas, minėtomis 10 adresų linijų, kompiuterio sistema gali operuoti 1024 atminties ląstelėmis ir 1024 įvesties/išvesties adresais. Kadangi įvesties/išvesties įrenginių ir atminties adresų erdvės atskirtos, šis adresavimo būdas vadinamas izoliuotuoju įvesties/išvesties adresavimu (isolated I/O).

50 DMA DMA kanalai DMA (Direct Memory Access) yra naudojama duomenų persiuntimui, aplenkiant procesorių. DMA metodui įgyvendinti reikia papildomo modulio sisteminėje magistralėje. Jis gali pavaduoti procesorių ir gali perimti iš jo kompiuterizuotos sistemos valdymą. Kai CPĮ reikia skaityti arba rašyti duomenų bloką, CP siunčia į DMA modulį komandą, kurioje nurodyta: ką reikia daryti - skaityti duomenis ar juos įrašyti, atitinkamo periferinio įrenginio adresas, pradinis atminties adresas, nuo kurio bus pradėta skaityti ar rašyti ir skaitomų ar rašomų žodžių skaičius. Toliau CPĮ tęsia anksčiau ankstesnę užduotį. Taip būdu centrinis procesorius Į/I operaciją perduoda DMA moduliui, o pastarasis užtikrina jos vykdymą. DMA modulis siunčia visą duomenų bloką, kiekvieną taktą po vieną žodį tiesiai į (iš) atmintį, netrukdant CPĮ. Kai visi duomenys yra persiųsti, DMA siunčia procesoriui pertraukties signalą (IRQ). Taigi, į keitimąsi duomenimis CPĮ įsiterpia tik perdavimo pradžioje ir pabaigoje.

51 DMA DMA (Direct Memori Access-tiesioginis kreipimasis į atmintį) – duomenų pasikeitimo tarp vidinio įrenginio ir atminties būdas nedalyvaujant procesoriui. Tai gali žymiai sumažinti procesoriaus apkrovimą ir padidinti bendrą sistemos darbingumą. DMA rėžimas atlaisvina procesorių nuo elementaraus duomenų persiuntinėjimo tarp vidinių įrenginių ir atminties, atiduodant šį darbą DMA kontroleriui; procesorius tuo metu gali apdoroti kitus duomenis ar uždavinius. PC turi 7 ar daugiau nepriklausomus DMA kontrolerio kanalus: 0-atminties regeneravimas kai kuriuose plokštėse; 1-nenaudojamas; 2-FDD kontroleris; 3- HDD kontroleris, 5-6-7-nenaudojami.

52

53

54

55

56 C51 Architectural Overview of the C51 Family (C51_AO.PDF)

57

58

59

60

61


Download ppt "Atmintinė."

Similar presentations


Ads by Google