190 likes | 389 Views
Operating System Features. Operating System Features. Memory protection Temporary file issues Dead space issues Sandboxing Object Request Brokers. Separation. Physical – processes use different physical objects Temporal – processes use same objects at different times
E N D
Operating System Features • Memory protection • Temporary file issues • Dead space issues • Sandboxing • Object Request Brokers
Separation • Physical – processes use different physical objects • Temporal – processes use same objects at different times • Logical – processes use objects in constrained space • Cryptographic – processes use only intelligible objects
Levels of Protection • None • Isolation • Share all/Share none • Share via access limitation • Share by capabilities • Limited use
Granularity • Volume (physical storage structure) • Data collection (file, database, memory) • Data element (entry, memory structure) • Field (value within data element) • Word (addressable memory unit) • Byte (character) • Bit (1/0) Detail vs. Efficiency
Mechanisms • Fence Register • Relocation • Base/Bounds Register • Tagged Architecture • Segmentation • Paging • Paged Segmentation • Capability
Fence Register • Address bounding protected and open memory • Protected, typically operating system • Open, typically user • No protection within bounds 0 Operating System 8192 Fence User Program Space 8193 Max
Relocation • Need to shift programs in memory • Programs written using memory 0 and above • Operating system translates to actual location • Retranslate to shift program in memory 0 Operating System 8192 Program A (old) 16384 Program A (new) 24576
Base/Bounds Register • Starting address for program – base register • Max allocated address – bounds register • Changed at context switch 0 Operating System Base 8192 16384 Program A 16384 Bound 20480 Program B 24576
C P C P C P D D D D D D 8192 Store C 0001 0002 0003 Load A 0006 10572 16384 0004 0005 Add B Tagged Architecture • Each word of memory has identified access rights • Rights tested on each access • Typically few distinctions • Data • Pointer • Control
Con. Con. Inst. Data Inst. Data Segmentation Operating System A Table rw • Program pieces • Instructions • Data • Constants • Access <seg, offset> • Store separately • Base • bound • Protect differently • Allow sharing • External fragmentation x Program B Data r Program Instructions B Table Program A Data rw wx Program Constants r
a j i c f e h g b d 2 1 0 3 b e j f j+53 Paging Page table • Equal-size blocks • Access <pg, offset> • Offset > size goes to next page • Difficult to protect • Less fragmentation • Difficult to share <2,53>
Paged Segmentation • Segment references translate to page references • <seg, offset> • <<page of seg>, <page offset>> • Segmentation for sharing/protection • Paging for ease of handling
Capabilities • Unforgeable token • Identity of object requested • Rights to object • Signature of broker • Control of rights transfer • Control of rights propagation • Done at structure level
Temporary File Issues • Temporary file – duration for life of process only • Intended private and non-invasive • Threats • Disclosure • Modification • Misdirection • Protection via atomic transactions
Dead Space Issues • What are default values? • Random • Zero • Whatever was there before • What are cleared values? • Random • Zero • Pattern • No clearing
Sandboxing • Restricted environment for untrusted code • Web code • Email code • Issues of completeness, operations available • Alternative: trust vendor signature(ActiveX) • Alternative: carry proof (lab systems) • Alternative: cryptography (Microsoft)
Object Request Brokers • Object – code and data bundle, limited access methods • Broker – mediate communication between objects • CORBA – industry standard • Still a lot of discussion about protection