Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739

Similar presentations


Presentation on theme: "CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739"— Presentation transcript:

1 CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu

2 cell phones off (please) 2

3 Announcements Exam 1 handback Exam 1 solution is posted Reminder: HW2 due tonight 3

4 Today’s Agenda Operating Systems –Responsibilities –Components –Processes –Examples from Windows/Unix 4

5 Hierarchy of software User-level applications System utilities User-interface to operating system kernel (window manager, shell) Kernel 5

6 http://commons.wikimedia.org/wiki/File:Kernel_Layout.svg 6

7 Responsibilities Shell/Window manager –Interactions with users File manager –Manages files in secondary storage (e.g. stored on a hard drive) –Directories/Files/Permissions Device manager / device drivers –Printers, cable modems, USB sticks, displays, etc. Memory manager –Manages main memory –Virtual memory and paging Process manager –Controls access to CPU 7

8 User-interaction Text-based shell –cmd prompt in Windows –Terminal in Unix-like systems –Programming capabilities Windows-Icons-Menus and Pointers (WIMP) –Window manager traditionally distinct from underlying OS –Easy to use 8

9 Bootstrapping If memory starts out empty, how is OS loaded? Instructions to load OS into memory are in non-volatile memory (ROM) That code loads rest of OS from secondary storage. 9

10 Process Management A process is a running program Multi-tasking –Time slices –Scheduler Maintains process table Memory assigned, priority, state of process –Dispatcher Allocates time-slice to each process Switching between processes is called a context switch Context switching driven by hardware interrupts Context switch stores current state, loads other process in its previous state 10

11 Resource contention Two processes want to use same resources Control access with flag Test flag – is resource available Set flag – mark resource as unavailable Clear flag – mark resource as available Test-interrupt-Test-Set-work-interrupt-Set-work 11


Download ppt "CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739"

Similar presentations


Ads by Google