140 likes | 278 Views
Resource Management. System Resources. What resources are managed in a computer system?. What resources are managed in a computer system?. Primary memory (RAM) Secondary storage (hard drive/disk storage) Central Processing Unit (CPU) Graphical Processing Unit (GPU)
E N D
Resource Management System Resources
What resources are managed in a computer system? • Primary memory (RAM) • Secondary storage (hard drive/disk storage) • Central Processing Unit (CPU) • Graphical Processing Unit (GPU) • Network bandwidth/connectivity • Screen resolution • Sound processor
How do resources differ on different systems? • Cost vs. Performance • No need to spend money on extra hardware if it is not needed • Examples: • Screens for mainframes and servers • Hard drives for cell phones • GPU for an e-book
What problems could occur from limited resources? • Limited memory use of secondary storage as memory • Secondary storage is slower time lost • Limited CPU programs run slower or system stalls • Limited GPU choppy, undetailed graphics • Limited network connectivity constant buffering and delays
Operating System Roles • Hardware management • Communicating with all hardware • Resource monitoring • processor time, memory usage, etc. • Coordinating concurrent processing • multiple programs (processes) running at the same time • Memory management • each program has their own space in memory • **Operating system hides the complex activities above from the user!**
Multi-processing/Multi-tasking • Memory allocation • Load program from hard drive into a section of memory (RAM) • Time-slicing (sharing CPU time across programs) • Giving a particular program a “slice” of time to run • Priority • A program can be given “priority” if it’s more important • e.g. window in focus, streaming services
Virtual Memory • What happens when you run too many programs and all of the memory is used up? What other storage is there? • How do we keep some memory free at all times?
Virtual Memory Terms • Paging / Swapping • Moving program data between memory and disk • Where do you see this stuff? • pagefile.sys in windows • /swap space in linux • Whenever you use up all your RAM and your hard drive goes crazy. • Optimizations • Whole programs do not have to fit in memory contiguously (all in one section) • Prevents memory segmentation • Pre-emptive paging
Discussion: Why are there different operating systems? • Mac OS X vs. iOS • Ubuntu Linux vs. Android • Advantages? (Hint: think in terms of design)
How does the OS represent hardware devices? • Hardware complexities are hidden from the user by the OS • Hardware is simplified and represented virtually by the OS • Examples • Mouse pointer • File tree and drive letters • Others?
OS Hardware Communication • How does the OS know “when” to communicate with hardware? • Interrupt vs. Polling • What do you think they mean?