Physical vs Logical Files Whats the Difference Who
![Physical vs Logical Files What’s the Difference? Who cares? Physical / Logical 13 -Sep-03 Physical vs Logical Files What’s the Difference? Who cares? Physical / Logical 13 -Sep-03](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-1.jpg)
![Physical vs Logical There are 2 places where it counts: 1. File operations (read Physical vs Logical There are 2 places where it counts: 1. File operations (read](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-2.jpg)
![Physical vs Logical We need to be aware of the physical perspective • Even Physical vs Logical We need to be aware of the physical perspective • Even](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-3.jpg)
![Logical View logical = how we (as programmers) see the file • The file Logical View logical = how we (as programmers) see the file • The file](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-4.jpg)
![Physical View physical = how O/S sees the file • Usually split into in Physical View physical = how O/S sees the file • Usually split into in](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-5.jpg)
![Logical View: File Organization File 1: ASCII “Luck is my middle name, ” said Logical View: File Organization File 1: ASCII “Luck is my middle name, ” said](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-6.jpg)
![Physical View: File Organization* Directory: 6 blocks File 1 Track 9; sector 8, block Physical View: File Organization* Directory: 6 blocks File 1 Track 9; sector 8, block](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-7.jpg)
![Logical View: File Operations “Luck is my middle name, ” said Rincewind, indistinctly. “Mind Logical View: File Operations “Luck is my middle name, ” said Rincewind, indistinctly. “Mind](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-8.jpg)
![Physical View: File Operations <READ char>1 4 6 5 7 8 6 9 7 Physical View: File Operations <READ char>1 4 6 5 7 8 6 9 7](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-9.jpg)
![Physical View: File Operations <READ char>2 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>2 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-10.jpg)
![Physical View: File Operations <READ char>3 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>3 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-11.jpg)
![Physical View: File Operations <READ char>4 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>4 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-12.jpg)
![Physical View: File Operations <READ char>5 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>5 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-13.jpg)
![Physical View: File Operations <READ char>6 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>6 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-14.jpg)
![Physical View: File Operations <READ char>7 2 4 6 5 7 8 6 9 Physical View: File Operations <READ char>7 2 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-15.jpg)
![Physical View: File Operations <READ char>8 2 4 6 5 7 8 6 9 Physical View: File Operations <READ char>8 2 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-16.jpg)
![Physical View: File Operations <READ char>9 2 4 6 5 7 8 6 9 Physical View: File Operations <READ char>9 2 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-17.jpg)
![What we have learned so far: • We design our programs with the logical What we have learned so far: • We design our programs with the logical](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-18.jpg)
![Uh huh. That’s nice. So what. Physical / Logical 13 -Sep-03 19 Uh huh. That’s nice. So what. Physical / Logical 13 -Sep-03 19](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-19.jpg)
![What’s it to me…. . • Know your device (or O/S). • Match your What’s it to me…. . • Know your device (or O/S). • Match your](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-20.jpg)
![Summary • Physical organization of file (and hence behaviour at HW level may be Summary • Physical organization of file (and hence behaviour at HW level may be](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-21.jpg)
- Slides: 21
![Physical vs Logical Files Whats the Difference Who cares Physical Logical 13 Sep03 Physical vs Logical Files What’s the Difference? Who cares? Physical / Logical 13 -Sep-03](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-1.jpg)
Physical vs Logical Files What’s the Difference? Who cares? Physical / Logical 13 -Sep-03 1
![Physical vs Logical There are 2 places where it counts 1 File operations read Physical vs Logical There are 2 places where it counts: 1. File operations (read](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-2.jpg)
Physical vs Logical There are 2 places where it counts: 1. File operations (read / write; open / close) 2. File organization (where stuff is in the file) Physical / Logical 13 -Sep-03 2
![Physical vs Logical We need to be aware of the physical perspective Even Physical vs Logical We need to be aware of the physical perspective • Even](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-3.jpg)
Physical vs Logical We need to be aware of the physical perspective • Even when we have no control over it • It still affects our program (what we don’t know can hurt us) • While we are working at the logical level • We can help; or get in the way – our choice Physical / Logical 13 -Sep-03 3
![Logical View logical how we as programmers see the file The file Logical View logical = how we (as programmers) see the file • The file](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-4.jpg)
Logical View logical = how we (as programmers) see the file • The file is in one piece. • The file can be anything (ASCII, pictures, records, music). • Its sub-structure imposed by software that we design and write. Physical / Logical 13 -Sep-03 4
![Physical View physical how OS sees the file Usually split into in Physical View physical = how O/S sees the file • Usually split into in](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-5.jpg)
Physical View physical = how O/S sees the file • Usually split into in chunks, the file may be scattered all over the place. • UNIX views a file as a stream of bytes. • The file’s sub-structure is none of our business (no peeking). Physical / Logical 13 -Sep-03 5
![Logical View File Organization File 1 ASCII Luck is my middle name said Logical View: File Organization File 1: ASCII “Luck is my middle name, ” said](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-6.jpg)
Logical View: File Organization File 1: ASCII “Luck is my middle name, ” said Rincewind, indistinctly. “Mind you, my first name is Bad. ”[Interesting Times, T. Pratchett] File 2: Mixed records Record 1 Record 2 Record 3 Record 4 Record 5 File 3: An image Physical / Logical 13 -Sep-03 6
![Physical View File Organization Directory 6 blocks File 1 Track 9 sector 8 block Physical View: File Organization* Directory: 6 blocks File 1 Track 9; sector 8, block](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-7.jpg)
Physical View: File Organization* Directory: 6 blocks File 1 Track 9; sector 8, block 14 4 6 5 7 Track 9; sector 8, block 15 8 Track 9; sector 8, block 16 Track 9; sector 9, block 01 : 6 Track 9; sector 10, block 1 File 2 7 blocks 9 7 3 3 5 2 2 Track 3; sector 9, block 10 : Track 5; sector 12, block 8 File 3 6 4 1 10 blocks : 1 2 3 4 5 6 7 8 11 5 14 1 4 10 3 Track 2; sector 1, block 4 9 10 13 12 1 2 Track 3; sector 9, block 11 * Not exactly as shown Physical / Logical 13 -Sep-03 7
![Logical View File Operations Luck is my middle name said Rincewind indistinctly Mind Logical View: File Operations “Luck is my middle name, ” said Rincewind, indistinctly. “Mind](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-8.jpg)
Logical View: File Operations “Luck is my middle name, ” said Rincewind, indistinctly. “Mind you, my first name is Bad. ” [Interesting Times, T. Pratchett] • Open file (need to establish connection between logical and physical file) • While (not end-of-file) do – Read char – Do some stuff with it • Blaa Physical / Logical 13 -Sep-03 8
![Physical View File Operations READ char1 4 6 5 7 8 6 9 7 Physical View: File Operations <READ char>1 4 6 5 7 8 6 9 7](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-9.jpg)
Physical View: File Operations <READ char>1 4 6 5 7 8 6 9 7 3 Program data space Memory 3 5 2 2 6 4 1 1 2 3 4 5 6 7 8 11 5 14 1 4 10 3 RTS gets read request ---- suspend program ----- 9 10 13 12 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 9
![Physical View File Operations READ char2 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>2 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-10.jpg)
Physical View: File Operations <READ char>2 1 4 6 5 7 8 6 9 7 3 Program data space Memory 5 2 2 6 4 1 1 2 3 4 5 6 7 8 9 10 11 13 12 5 14 1 4 10 3 Locate block containing char (dir ; file-ptr) Load block into memory 3 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 10
![Physical View File Operations READ char3 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>3 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-11.jpg)
Physical View: File Operations <READ char>3 1 4 6 5 7 8 6 9 7 3 Program data space Memory 5 2 2 6 4 1 1 2 3 4 5 6 7 8 9 10 11 13 12 5 14 1 4 10 3 Move designated char from I/O buffer to program data space ---resume program---- 3 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 11
![Physical View File Operations READ char4 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>4 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-12.jpg)
Physical View: File Operations <READ char>4 1 4 6 5 7 8 6 9 7 3 Program data space Memory 5 2 2 6 4 1 1 2 3 4 5 6 7 8 9 10 11 13 12 5 14 1 4 10 3 Next read: Move designated char from I/O buffer to program data space ---resume program---- 3 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 12
![Physical View File Operations READ char5 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>5 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-13.jpg)
Physical View: File Operations <READ char>5 1 4 6 5 7 8 6 9 7 3 Program data space Memory 5 2 2 6 4 1 1 2 3 4 5 6 7 8 9 10 11 13 12 5 14 1 4 10 3 Next read: Move designated char from I/O buffer to program data space ---resume program---- 3 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 13
![Physical View File Operations READ char6 1 4 6 5 7 8 6 9 Physical View: File Operations <READ char>6 1 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-14.jpg)
Physical View: File Operations <READ char>6 1 4 6 5 7 8 6 9 7 3 Program data space Memory 5 2 2 6 4 1 1 2 3 4 5 6 7 8 9 10 11 13 12 5 14 1 4 10 3 Next read: Move designated char from I/O buffer to program data space ---resume program---- 3 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 14
![Physical View File Operations READ char7 2 4 6 5 7 8 6 9 Physical View: File Operations <READ char>7 2 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-15.jpg)
Physical View: File Operations <READ char>7 2 4 6 5 7 8 6 9 7 3 Program data space Memory 5 2 2 6 4 1 1 2 3 4 5 6 7 8 9 10 11 13 12 5 14 1 4 10 3 Next read: Data NOT in memory… ---- suspend program ----Locate block containing char (dir ; file-ptr) Load block into memory 3 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 15
![Physical View File Operations READ char8 2 4 6 5 7 8 6 9 Physical View: File Operations <READ char>8 2 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-16.jpg)
Physical View: File Operations <READ char>8 2 4 6 5 7 8 6 9 7 3 Program data space Memory 5 2 2 6 4 1 1 2 3 4 5 6 7 8 9 10 11 13 12 5 14 1 4 10 3 Move designated char from I/O buffer to program data space ---resume program---- 3 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 16
![Physical View File Operations READ char9 2 4 6 5 7 8 6 9 Physical View: File Operations <READ char>9 2 4 6 5 7 8 6 9](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-17.jpg)
Physical View: File Operations <READ char>9 2 4 6 5 7 8 6 9 7 3 Program data space Memory 5 2 2 6 4 1 1 2 3 4 5 6 7 8 9 10 11 13 12 5 14 1 4 10 3 And so on 3 1 2 * Not exactly as shown Physical / Logical 13 -Sep-03 17
![What we have learned so far We design our programs with the logical What we have learned so far: • We design our programs with the logical](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-18.jpg)
What we have learned so far: • We design our programs with the logical view in mind. • We run our programs using our logical perspective; but the file still gets manipulated from the physical perspective. Physical / Logical 13 -Sep-03 18
![Uh huh Thats nice So what Physical Logical 13 Sep03 19 Uh huh. That’s nice. So what. Physical / Logical 13 -Sep-03 19](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-19.jpg)
Uh huh. That’s nice. So what. Physical / Logical 13 -Sep-03 19
![Whats it to me Know your device or OS Match your What’s it to me…. . • Know your device (or O/S). • Match your](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-20.jpg)
What’s it to me…. . • Know your device (or O/S). • Match your internal sub-structure to fit the device (but, what about portability? ) • Let your algorithms account for physical operations. • Be aware that access between physical blocks is likely to take more time than access inside physical blocks. Physical / Logical 13 -Sep-03 20
![Summary Physical organization of file and hence behaviour at HW level may be Summary • Physical organization of file (and hence behaviour at HW level may be](https://slidetodoc.com/presentation_image/4494118150a75a3862c0a3f8482b315d/image-21.jpg)
Summary • Physical organization of file (and hence behaviour at HW level may be different from logical organization. • Physical reads/writes may happen at different times from logical reads/writes. • We usually have little control over the physical view. Physical / Logical 13 -Sep-03 21
File mode python
Cjis security awareness training
Ncic hosts restricted files and non-restricted files
Internal logical files
Physical image vs logical image
Logical form and logical equivalence
Kesetaraan logis adalah
Whats physical change
Whats the difference between a chemical and physical change
Difference between physical and chemical change
Physical and logical structure of oracle database
Memory swaping
Dfd symbols
Logical vs physical security
A logical grouping of characters is a?
Difference between arithmetic shift and logical shift
Difference between arithmetic shift and logical shift
Difference between arithmetic shift and logical shift
Difference between arithmetic shift and logical shift
Difference between arithmetic shift and logical shift
Hát kết hợp bộ gõ cơ thể
Ng-html