Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2015.

Similar presentations


Presentation on theme: "COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2015."— Presentation transcript:

1 COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2015

2 Week 5: Data representation and data transfer n Learning Objectives:  Explain how data is transferred between devices  Explain how storage media store data and how it can be retrieved  Explain how to find data held on a storage medium by using “search string” or location  Explain how data on a storage medium can be displayed by named software tools

3 Memory and Boot-up n BOOT process requires CPU instructions…  have to be stored somewhere (in files) n Booting up is a matter of loading all these files & their programs n Where to store?  need to be accessed & processed as quickly as possible!

4 Primary & Secondary Storage n n Primary storage:   interacts directly with CPU   held on motherboard, controlled by system clock   very fast n n Secondary storage:   accessible to CPU via i/o calls » »e.g. INT 21 (Intel 8086…)   contained on media attached via ports   can be slow…

5 Virtual Memory n n Use of fast secondary storage device locations as if they were primary storage locations…   hard disk   storage addressed directly by the CPU n n Requires programmed mapping between extra primary storage locations & secondary storage locations   adv: unlikely that the CPU will run out of “memory”   disadv: performance “falls of a cliff” when virtual memory used instead of primary storage

6 “Firmware” n Software held on EPROM (erasable, programmable) chip  can’t easily be tampered with  IDEAL for low-level operating system programs, ensures rapid boot-up  also embedded applications n May need updating…  some flexibility to overwrite

7 Questions n Is virtual memory primary or secondary storage? n What about firmware?

8 What could Stored Data Represent… n With one 1 byte word:  i.e. 1 byte per memory location n Could be many things!!! n Can be difficult to decide what the data really does represent…  e.g: data has been recovered from a location; presented as 4E (hex) »what is it… ?

9 What could “4E” represent? n Could be part of a program instruction  in assembly language  or source code (as ASCII code) n Program data  as a number  as an ASCII character… 0 1 0 0 1 1 1 0

10 More possibilities for “4E” n n Over to you… n n In groups… n n Five minutes…

11 Putting meaning onto raw data… (1) n n Single item of data… at a single location… (e.g “peeked” as 4E) could be anything! n n Only find out context by studying other bytes around it…   if next byte is… 4F (hex)   and byte after that is… 57 (hex)   the ASCII codes together spell “NOW”   so the bytes are probably all ASCII codes

12 Putting meaning onto raw data… (2) n n What if the next bytes were 6B and 7D?   ASCII codes would deliver… Nk} » »not a proper word » »data probably not ASCII codes   What else? » »could be integers between 0 and 255 n n 116 153 1275 n n maybe stored variables, or constants… n n Wrong to assume… keep an open mind!

13 Use of “Control Bits” n n The byte could also be broken up into two nibbles of data   0100… could be an integer of value 4   1110… could be an integer of value 14 n n It could also be made up of 8 “Boolean” values, which could control outputs to machinery   i.e. 0 = off; 1 = on

14 Looking at Memory locations… (Peeking) n n Intel 8086 tool… debug   available since early days of DOS n n Debug needs –d parameter to peek…   shows 128 bytes at a time (& corresp ASCII codes)   default memory location is the start of “free” memory » »locations may still contain data from previous usage n n Specified memory locations can be peeked   e.g. –d 0200 for next 128 bytes starting from &0200

15 “Peeking” and “Poking”… n n & … represents address (as opposed to data) n n Debug –d can be used to present a whole range of memory   e.g. –d 0200 0300 would display every byte between addresses &0200 (hex) and &0300 (hex) n n Debug –e can overwrite contents of a specified location (or sequence of locations) with new data   called “poking”   potentially can crash the computer… (!)

16 Protection against memory overwrite n n Operating system protects memory addresses used by “active” processes n n Use of debug -e bypasses protection!!!   only protection for computer’s primary memory is to disable the debug program   but could in theory still be executed remotely, if administrative access to local computer has been granted… (!)

17 How does data get between devices? n Data usually needs to go in both directions… DEVICE ADEVICE B

18 Three Data Communication Alternatives n Simplex  one direction only n Example:  Broadcast data from a radio or TV mast

19 Data Transfer n Half Duplex  one direction only at a time n Example:  Data sent along a single copper wire first then

20 Data Transfer n Full Duplex  both directions simultaneously n Example:  Broadband telephone communications

21 i/o connections with the motherboard n Normally connect digital i/o devices to the motherboard via:  Direct connections through “ports”  Click in expansion or “daughter” cards with their own ports

22 i/o Buses used with older expansion Cards n ISA = Industry Standard Association  early (1981-1984) communications standard  speed: up to 16 MB s -1  8 or 16-bit parallel connections n PCI = Peripheral Component Interconnect  later (1990-1993) communications standard  speed: up to 133 MB s -1  32-bit parallel connection  ‘Plug and play’ – no set-up software needed, (depending on the operating system used…)

23 Older Motherboard: PCI & ISA slots from http://www.ibase-i.com.tw/mb700pixel600.jpg ISA slot PCI slot

24 Peripheral Connectors on the Motherboard n On-board IDE slot (now legacy)  up to TWO hard disk or DVD-ROM  40-pin “ribbon” cable n On-board SCSI slot (server board)  connects a much larger number of devices

25 Other Hard Disk connections n On-board SATA slot  thinner ribbon cable  3.5” SATA hard disk  2.5” SATA hard disk n External SATA hard disk  Connected to motherboard via USB

26 STAR motherboard architecture n Copied from “star” arrangement for networking computers  one hub (MCH) connects fast components »hub at centre; components at ends of ‘spokes’  other hub (IOCH) connects slower components and peripherals  hubs communicate directly with each other

27 Motherboard Hubs n MCH = Memory Control Hub  connects very fast devices together in a ‘star’ configuration n I(O)CH = Input-output Control Hub  connects together slower devices, also in a star configuration

28 MCH and I(O)CH from http://www.3dnews.ru/motherboard/intel-ht-chipset/

29 Motherboard with MCH and ICH from http://www.tomshardware.com/motherboard/20040712/i865-i875-mobos- 21.html MCH ICH

30 Why arrange motherboard components like this? n Longer wires…  more time to send messages (good)  degradation of message at high speed (bad) n Therefore…  important for fast components to be close together  slower components can be further apart

31 Motherboard with MCH and ICH from http://www.tomshardware.com/motherboard/20040712/i865-i875-mobos- 21.html ICH MCH Socket for processor Slots for RAM cards AGP slot

32 Another PC Motherboard… from http://www.techiwarehouse.com/cms/articles.php?cat=13

33 Motherboard & expansion board from http://www.answers.com/topic/motherboard

34 Finding data on Secondary Storage (1) n n “file” ~ conventional name for a package of bytes of data   Primary storage : controlled directly by CPU instructions   Secondary storage: controlled by hard disk controller programs & file system manager

35 Primary/Secondary Storage of data as files n n Secondary storage devices organise data for quick access   logically structured into “partitions”   If Windows = operating system, each partition allocated a letter (e.g. C:, D:, etc.

36 File Organisation on Disk n Disk could be stretched out to form a long line of sectors  size of sectors depends on formatting type »512 locations (i.e. bytes) »2048 locations  files laid down in sectors

37 Finding data on Secondary Storage n n Essential for each partition to create a table or catalogue for starting address of files that are written to it   otherwise the file becomes very difficult to retrieve… n n Method depends on filing system chosen when partition formatted…   As well as formatting each filing system structures the media to receive data in its own unique way…

38 “Boot Sector” n Important for hard disk boot up n Process of loading operating system from on secondary storage starts from…  provides configuration information for effective communication with CPU  if damaged, boot up halted! »should have a backup… needs to be copied to boot sector to overwrite corrupted data

39 Partitions n Created by special program n Areas of hard disk managed by a file system  different partitions can use different file systems  single boot partition containing boot sector »can point to different operating systems »Selectable via screen menu

40 Booting up: loading an Operating System… n Needs to be loaded into RAM  some operating systems load everything from ROM  others use a combination… »some loaded first from ROM »rest from hard disk or other source n Hard disk needs a bootable partition to load rest of operating system into RAM

41 Data Storage on Disk Partition n Sectors numbered n Files stored in specified sector address ranges

42 Disk Catalogues n Organise files into directories/folders  Top folder (C:) = root  Rest of folders link hierarchically n Catalogue logically allocates each file to a folder for ease of retrieval

43 Fragmentation of Data on Secondary Storage n n General problem with hierarchical data storage…   deleted data items leave holes in the structure n n New data items saved try to fill the gaps   large files can be broken into fragments   fragments linked by address pointers   slows down retrieval

44 Removing Fragmentation n n If disk only partly fragmented…   defragmented files copied into memory   remaining files moved around to close up holes   Previously defragmented files copied back to disk as complete files n n If disk >75% fragmented   most effective solution is to copy all files to another partition   can copy back later once original partition has all data deleted

45 Is it true that deleted files aren’t really deleted? n n Absolutely! n n Two things happen when a file is deleted:   the first data item stored in the file (first character of filename) is changed to “?”   the catalogue entry ceases to recognise & display the filename » »starting address shows “?” Character » »file system is programmed to ignore ? at such a location n n Rest of the data is untouched…   easily demonstrated through use of a Hex editor program: can show file contents “before” and “after”

46 “Normal” Loading of a File from Secondary Media n n File catalogue essential for data retrieval   application reads file catalogue » »displays folders and files   user chooses file, application uses disk addresses to load into memory n n What if file catalogue corrupted?   backup copy on disk…   what if both become corrupted?

47 Direct access by address on Secondary Media n n If both file catalogues are damaged…   file (and its data) cannot be located n n “Hex editors” available to do the equivalent of debug –d (peek) and –e (poke) » »enables full search of all addresses for particular ASCII string(s)   essential for recovery of data… n n Also used for restoring recently deleted files   “?” character restored to a real character   then be picked up & shown on catalogue display

48 WinHex n n Probably the most popular tool to examine hard disks   readout quite similar to debug –e   data presented byte-by-byte according to catalogue address   range of options for extracting, overwriting data, and (like debug) writing consecutive raw data items to a file


Download ppt "COMP 1321 Digital Infrastructure Richard Henson University of Worcester October 2015."

Similar presentations


Ads by Google