Download presentation
Presentation is loading. Please wait.
Published byMarshall Turner Modified over 6 years ago
1
Naming and Binding A computer system is merely a bunch of resources that are glued together with names Thus, much of system design is merely making choices regarding naming three abstractions in a system memories store named objects interpreters (processors and translators) manipulate named objects communication links connect named entities
2
Naming and Binding binding - assignment of name, value, or other attribute to an object the name can be symbolic, binary address, ... the value can be text, binary value, ... value name
3
Naming and Binding naming
syntax: what are the rules in constructing a valid name? range: how many different objects can you name? order: binary numbers are ordered, add offset to one to construct another granularity: what size unit is assigned a name - bit, byte, word, block? homogeneity: array name is name of collection of homogeneous data, while struct/record name is name of collection of heterogeneous data
4
Naming and Binding naming (cont’d)
dimensionality: vector, array, etc.? (true segmentation uses a two-dimensional name) context-dependent / overloaded name: abbreviated name must use some form of context to disambiguate; that is, a name resolution mechanism to resolve the name among multiple possible object references; context search rules typically called "scoping") aliases: multiple names for same object protection: do you associate access rights with names or with objects? (e.g., consider file system)
5
Naming and Binding binding type static binding - done once
dynamic binding - done several times (dynamic binding of names usually requires a naming table) binding time - when done - e.g., compile time, run time early binding late binding, sometimes called lazy evaluation - done only when needed (e.g., "just-in-time" compiler) static, early binding - e.g., compile-time binding in a strongly-typed language, catch errors early, can execute efficiently
6
Naming and Binding binding time (cont’d)
dynamic, late binding - e.g., run-time binding in an interpretative language, flexible, easier to debug, but often slow
7
Naming and Binding dynamic assignment of value dynamic naming
static binding dynamic binding assemble time symbol name to address link time external addr. resol. relocation load time relocation run time (can be sub-divided, e.g. procedure-entry time) “dynamic” linking is really a misnomer, since binding done at run time on first call – this is lazy evaluation value to mem location parameter passing I/O buffers choosing ISR (through int. vect. table) segmentation/paging (thru seg/pg table) file system directory file index nodes linked list with dyn. memory allocation dynamic assignment of value dynamic naming (separate name table) name table is in links main advantage is speed (low overhead) main advantage is flexibility (ability to change named object without modifying the invoker of the name)
8
Naming and Binding quote attributed to David Wheeler of EDSAC fame
"All problems in computer science can be solved by another level of indirection." also attributed to Butler Lampson Kevlin Henney corollary: "...except for the problem of too many layers of indirection."
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.