CS162 Operating Systems and Systems Programming Lecture 28 ManyCore Quantum Computing and Other Topics December 10 2008 Prof John Kubiatowicz http inst eecs berkeley edu cs162 Requests for Final Topics Some topics people requested Dragons too big of a topic for today ManyCore Operating Systems Quantum Computers and factoring Mobile Operating Systems User Sessions Power Management Data Privacy Berkeley OS History Today ManyCore Parallel OS Realtime OS Quantum Computing and Quantum factoring Other Topics Come look for me at office hours Or any other time 12 10 08 Kubiatowicz CS162 UCB Fall 2008 Lec 28 2 ManyCore Chips The future is on the way Intel 80 core multicore chip Feb 2007 80 simple cores Two floating point engines core Mesh like network on a chip 100 million transistors 65nm feature size Frequency Voltage Power Bandwidth Performance 3 16 GHz 0 95 V 62W 1 62 Terabits s 1 01 Teraflops 5 1 GHz 1 2 V 175W 2 61 Terabits s 1 63 Teraflops 5 7 GHz 1 35 V 265W 2 92 Terabits s 1 81 Teraflops ManyCore refers to many processors chip 64 128 Hard to say exact boundary How to program these Use 2 CPUs for video audio Use 1 for word processor 1 for browser 76 for virus checking Something new is clearly needed Kubiatowicz CS162 UCB Fall 2008 here 12 10 08 Lec 28 3 Traditional Parallel OS Job of OS is support and protect Need to stay out of way of application Traditional single threaded OS Only one thread active inside kernel at a time One exception interrupt handlers Does not mean that that there aren t many threads just that all but one of them are asleep or in user space Easiest to think about no problems introduced by sharing Easy to enforce if only one processor with single core Never context switch when thread is in middle of system call Always disable interrupts when dangerous Didn t get in way of performance since only one task could actually happen simultaneously anyway Problem with Parallel OSs code base already very large by time that parallel processing hit mainstream Lots of code that couldn t deal with multiple simultaneous threads One or two locks for whole system 12 10 08 Kubiatowicz CS162 UCB Fall 2008 Lec 28 4 Some Tricky Things about Parallel OSs How to get truly multithreaded kernel More things happening simultaneously need for Synchronization thread safe queues critical sections Reentrant Code code that can have multiple threads executing in it at the same time Removal of global variables since multiple threads may need a variable at the same time Potential for greater performance need for Splitting kernel tasks into pieces Very labor intensive process of parallelizing kernel Starting from pre existing code base very hard Needed to rewrite major portions of kernel with finergrained locks Shared among multiple threads on multiple processors Must satisfy multiple parallel requests Bottlenecks coarse grained locks in resource allocation can kill all performance Truly multithreaded mainstream kernels are recent Linux 2 6 Windows XP 12 10 08 Kubiatowicz CS162 UCB Fall 2008 Lec 28 5 How Should OSs Change for ManyCore 12 10 08 Kubiatowicz CS162 UCB Fall 2008 Lec 28 6 ManyCore opportunities Rethink the Sink Computing Resources are not Limited High Utilization of every core unnecessary Partition Spatially rather than Temporally Protection domains not necessarily heavyweight Spatial Partitioning protection crossing as simple as sending a message from one part of chip to another I O devices not necessarily limited and do not need to be heavily multiplexed High bandwidth devices available through network FLASH or other persistent storage yields fast flat hierarchy not necessarily disk as bottleneck New constraints Power Energy major concern Security extremely important Parallelism must be exploited in applications Extremely important for OS to get out of the way 12 10 08 Kubiatowicz CS162 UCB Fall 2008 Lec 28 7 Important New Mechanism Spatial Partitioning Spatial Partition group of processors acting within hardware boundary Boundaries are hard communication between partitions controlled Anything goes within partition Each Partition receives a vector of resources Some number of dedicated processors Some set of dedicated resources exclusive access Complete access to certain hardware devices Dedicated raw storage partition Some guaranteed fraction of other resources QoS guarantee Memory bandwidth Network bandwidth fractional services from other partitions Key Idea Resource Isolation Between Partitions Kubiatowicz CS162 UCB Fall 2008 12 10 08 Lec 28 8 OS as Distributed System Device Drivers Secure Channel Secure Channel re Secu el n Chan Secure Channel Balanced Gang Se Ch cure an ne l Individual Partition Use lessons from from Large Distributed Systems Like Peer to Peer on chip OS is a set of independent interacting components Shared state across components minimized Component based design All applications designed with pieces from many sources Requires composition Performance Interfaces Security Spatial Partitioning Advantages Protection of computing resources not required within partition High walls between partitions anything goes within partition Bare Metal access to hardware resources Partitions exist simultaneously fast communication between domains Applications split into distrusting partitions w controlled communication Hardware acceleration tagging for fast secure messaging 12 10 08 Kubiatowicz CS162 UCB Fall 2008 Lec 28 9 It s all about the communication We are interested in communication for many reasons Communication represents a security vulnerability Quality of Service QoS boils down message tracking Communication efficiency impacts decomposability Shared components complicate resource isolation Se Application A Need distributed mechanism for tracking and Ch cure an accounting of resource ne usage l E g How do we guarantee that each File partition gets Shared Service e ur of a guaranteed fraction el the service ec Application B 12 10 08 S nn a Ch Kubiatowicz CS162 UCB Fall 2008 Lec 28 10 Tessellation The Exploded OS Firewall Virus Large Compute BoundIntrusion Application Monitor And Adapt Real Time Application Identity Persistent Storage File System Video Window Drivers HCI Device Voice Drivers Rec Normal Components split into pieces Device drivers Security Reliability Network Services Performance TCP IP stack Firewall Virus Checking Intrusion Detection Persistent Storage Performance Security Reliability Monitoring services Performance counters Introspection Identity
View Full Document
Unlocking...