Operating SystemsOverviewBasicsHistoryResponsibilitiesProcessesInterruptsProcess StatesFile SystemsFiles Continued…MemoryMemory Continued…PagingVirtual MemorySchedulingLinuxWindowsSummaryReferencesQuestionsOperating SystemsDouglas HowellApril 10, 2008COT 4810Overview•Basics•History•Processes•File Systems•Memory•Scheduling•ApplicationsBasics•What is an operating system?•“Black Box” between user and hardware•O.S. core: known as the kernel•Loaded by a bootstrapper from ROM•“An event driven program that provides an interface between the user and machine, handles all resources efficiently, and creates an environment for programs to run.” (E. Montagne)History•1950s: First O.S. by General Motors, one job•1960s: multiple jobs; UNIX developed by Bell Labs in 1964•1970s: timesharing, networking and security•1980s: DOS, rise of the GUI, Macintosh•1990s: distributed systems,Windows 3.1, 95, etc•Current: Windows XP / VistaResponsibilities•Program execution•Interrupt handling•File systems•Resource Allocation•Scheduling•Protection•OthersProcesses•Execution of a program!•Each process has a control block (PCB)•Threads: same data,split process into parts,execute in parallel•Stored in Program State Word(psw)•Control transferred to Interrupt Handler•Software Interrupts: system calls,Traps: overflow, mem. protection, priv. instr.•Hardware Interrupts: I/O, TimerInterruptsProcess StatesRunningReadyNew SuspendEndAbendWaitSIOI/O Int.DispatchTimer Int.CreateExitTrapFile Systems•Information stored in a hierarchy:1(low): bits, grouped into bit patterns2: bytes, chars, fixed-length patterns3: fields, groups of chars4: records, groups of fields5: files, groups of records•O.S. provides file manipulation, i.e. open, close, copy, create, delete, etc.Files Continued…•Hierarchy of directories in a tree structure•File allocation:–Contiguous: specify file size, fast access, external fragmentation–Noncontiguous: linked-lists, blocks, internal fragmentation•Keep track of free space: free list or bitmapsMemory•All programs must be in memory before execution•Cache: faster than main memory, even more “expensive”•Secondary disk storage, different strategies used to determine when to move data to main memoryMemory Continued…•Contiguous vs. Noncontiguous•External Fragmentation vs. Internal Fragmentation•First-fit•Best-fit•Worst-fitOSOSUsedUnusedUsedUnusedUsedUnusedP1P2P3UsedUnusedPaging•Virtual addresses take form (P,D), where P is the page # and D is the displacement in the page•Page #’s not in memory are loaded in#Page TablePPage 1Page 2Page 3Page 4ProcessPage XPage YDFrames1234MemVirtual Memory•Provides an illusion of more memory•Processes reference virtual addresses•Memory addresses are physical•Accomplished using disk storage•Requires address mappingScheduling•Maximize throughput, utilization•Minimize response times, overhead •High-level: job scheduling, system determines which jobs can compete for resources•Intermediate: buffer, suspends and resumes processes to smooth system•Low-level: priority based to determine which process is running–FIFO, Round Robin, Shortest Run Time, etc.•Preemptive vs. NonpreemptiveLinux•Created in 1991 by Linus Torvalds•Expanded upon UNIX and various people’s submissions•Access applications via user interface, access resources via system calls, use the kernel to access the systems hardware•Doesn’t come with a GUI•Kernel threads are called daemons!Windows•1985: Windows 1.0•1987: Windows 2.03•1990: Windows 3.0•1992: Windows 3.1•1995: Windows 95•1996: Windows NT 4.0•1998: Windows 98•2000: Windows ME•2000: Windows 2000 Professional•2001: Windows XP Home/Professional•2007: Windows VistaSummary•Operating systems used in everything:–cellphones, digital cameras, telescopes, music players, game consoles, etc.•Provides a medium between the user and the hardware•Manages resources, file systems, memoryReferences•Deitel, Harvey M., et. al., Operating Systems 3rd Ed. Pearson 2004.•Montagne, E. COP4600 Class Notes Spring 2008.•“Operating system,” www.wikipedia.com.Questions•1) Name three responsibilities of an operating system.•2) Place the following in order by access time: memory, disk,
View Full Document