logging in or signing up CSEP spring week 5a Tarzen Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 343 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: June 16, 2007 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Computer Systems and Elements of Programming: Computer Systems and Elements of Programming Lecturer: Steve Maybank School of Computer Science and Information Systems sjmaybank@dcs.bbk.ac.uk Spring 2007 Week 5a: Operating Systems Definition of an Operating System: Definition of an Operating System An operating system is the software that controls the overall operation of a computer Examples of Operating Systems: Examples of Operating Systems Windows XP (2001). Windows Vista (2007) – enhanced security. UNIX – officially named in 1970 after long period of unofficial development. Linux (1991) – UNIX like, free open source software. 95% of all computers use a Windows OS Activities of the Operating System: Activities of the Operating System Control and allocation of memory File management Control of input and output devices Scheduling processes Despatching processes User interface Sizes of Operating Systems: Sizes of Operating Systems 3rd column: x106 lines of code Types of Software: Types of Software Application Software for tasks specific to an application, e.g. word processing, payroll, image processing… System Software for general computer system tasks Parts of the System Software: Parts of the System Software Utility software fundamental activities not included in the operating system, e.g. formatting a disk. Operating System coordination of the computer’s activities Software Classification: Software Classification Utility Operating system Shell System Application Software Kernel Shell or User Interface: Shell or User Interface Task: communication between users and the machine Graphical User Interface (GUI): objects, e.g. files, are represented on a screen by small pictures or icons. Window manager: allocates windows on the screen to processes. Kernel: Kernel File manager Device drivers Memory manager Scheduling of processes Dispatching of processes The kernel software performs the basic functions required by the computer, such as Components of the Operating System: Components of the Operating System kernel Operating system = kernel + shell user user user shell user Windows Screen Shot: Windows Screen Shot http://www.digibarn.com/collections/screenshots/ UNIX BASH Shell Screen Shot: UNIX BASH Shell Screen Shot http://en.wikipedia.org/wiki/Image:Bash_screenshot.png Commands are typed in line by line. There is no 'point and click' Getting Started: Bootstrap: Getting Started: Bootstrap Main memory has a small section of permanent read only memory (ROM). The ROM contains a small program (the bootstrap) that reads in the operating system from mass storage and then transfers control to it. At start up the CPU runs the bootstrap. Reason: the storing of an entire operating system in ROM is too expensive. File Manager: File Manager Keeps a list of all files in mass storage and their properties. Groups files into directories. File descriptor: information provided by the file manager to allow access to a file by a process. Windows: file=document, directory = folder Hierarchy of Files and Directories: Hierarchy of Files and Directories Directory 2 Directory 1 Directory 3 File 3 File 1 File 2 Directory 4 A directories can contain other directories or files or both. A file cannot contain a directory. A file cannot contain another file. Directory path Device Driver: Device Driver Communicates with the controllers of a peripheral device, e.g. printer, disk drive, magnetic tape, monitor. Each type of peripheral has its own driver. Translates general requests (read, write,…) into commands for a specific peripheral device. Memory Manager: Memory Manager Coordinates occupation of main memory by different processes and their data. May create virtual memory: a process ‘sees’ memory cells 0 to 2N –1 (N large) of which 0 to 2M –1 are main memory 2M to 2N –1 are on the hard disk. Scheduler: Scheduler Tasks: record processes in the system, introduce new processes, remove processes that are complete. Process table: a list of processes in the system and their properties, e.g. memory area, priority, ready or waiting. Best way of assigning priorities? Dispatcher: Dispatcher Task: runs those processes which are ready to run. Time slice: short time (~50 ms) during which a single process is run. Each process takes its turn to run for a time slice. Aim: to prevent a single long running process from blocking other processes. Deadlock: Deadlock Deadlock occurs when two or more processes are blocked from progressing because each is waiting for a resource which is allocated to the other. Example: process 1 is allocated the printer and requests the CD player; process 2 is allocated the CD player and requests the printer. Necessary Conditions for Deadlock: Necessary Conditions for Deadlock There is competition for a non-shareable resource. Resources are requested partially rather than all at once. Once allocated a resource cannot be forcibly retrieved. Solutions to Deadlock: Solutions to Deadlock Deadlock detection and correction (e.g. kill a process) Convert non-shareable resources into shareable (e.g. spooling). Allocate resources to a process entirely or not at all. Example: Example Five philosophers are sitting at a round table. In front of each is a plate of spaghetti. There are five forks on the table, one between each pair of plates. Each philosopher is either thinking or eating. To eat a philosopher requires both the forks that are adjacent to his plate. Identify the possibilities for deadlock. You do not have the permission to view this presentation. In order to view it, please contact the author of the presentation.
CSEP spring week 5a Tarzen Download Post to : URL : Related Presentations : Share Add to Flag Embed Email Send to Blogs and Networks Add to Channel Uploaded from authorPOINT Insert YouTube videos in PowerPont slides with aS Desktop Copy embed code: (To copy code, click on the text box) Embed: URL: Thumbnail: WordPress Embed Customize Embed The presentation is successfully added In Your Favorites. Views: 343 Category: Entertainment License: All Rights Reserved Like it (0) Dislike it (0) Added: June 16, 2007 This Presentation is Public Favorites: 0 Presentation Description No description available. Comments Posting comment... Premium member Presentation Transcript Computer Systems and Elements of Programming: Computer Systems and Elements of Programming Lecturer: Steve Maybank School of Computer Science and Information Systems sjmaybank@dcs.bbk.ac.uk Spring 2007 Week 5a: Operating Systems Definition of an Operating System: Definition of an Operating System An operating system is the software that controls the overall operation of a computer Examples of Operating Systems: Examples of Operating Systems Windows XP (2001). Windows Vista (2007) – enhanced security. UNIX – officially named in 1970 after long period of unofficial development. Linux (1991) – UNIX like, free open source software. 95% of all computers use a Windows OS Activities of the Operating System: Activities of the Operating System Control and allocation of memory File management Control of input and output devices Scheduling processes Despatching processes User interface Sizes of Operating Systems: Sizes of Operating Systems 3rd column: x106 lines of code Types of Software: Types of Software Application Software for tasks specific to an application, e.g. word processing, payroll, image processing… System Software for general computer system tasks Parts of the System Software: Parts of the System Software Utility software fundamental activities not included in the operating system, e.g. formatting a disk. Operating System coordination of the computer’s activities Software Classification: Software Classification Utility Operating system Shell System Application Software Kernel Shell or User Interface: Shell or User Interface Task: communication between users and the machine Graphical User Interface (GUI): objects, e.g. files, are represented on a screen by small pictures or icons. Window manager: allocates windows on the screen to processes. Kernel: Kernel File manager Device drivers Memory manager Scheduling of processes Dispatching of processes The kernel software performs the basic functions required by the computer, such as Components of the Operating System: Components of the Operating System kernel Operating system = kernel + shell user user user shell user Windows Screen Shot: Windows Screen Shot http://www.digibarn.com/collections/screenshots/ UNIX BASH Shell Screen Shot: UNIX BASH Shell Screen Shot http://en.wikipedia.org/wiki/Image:Bash_screenshot.png Commands are typed in line by line. There is no 'point and click' Getting Started: Bootstrap: Getting Started: Bootstrap Main memory has a small section of permanent read only memory (ROM). The ROM contains a small program (the bootstrap) that reads in the operating system from mass storage and then transfers control to it. At start up the CPU runs the bootstrap. Reason: the storing of an entire operating system in ROM is too expensive. File Manager: File Manager Keeps a list of all files in mass storage and their properties. Groups files into directories. File descriptor: information provided by the file manager to allow access to a file by a process. Windows: file=document, directory = folder Hierarchy of Files and Directories: Hierarchy of Files and Directories Directory 2 Directory 1 Directory 3 File 3 File 1 File 2 Directory 4 A directories can contain other directories or files or both. A file cannot contain a directory. A file cannot contain another file. Directory path Device Driver: Device Driver Communicates with the controllers of a peripheral device, e.g. printer, disk drive, magnetic tape, monitor. Each type of peripheral has its own driver. Translates general requests (read, write,…) into commands for a specific peripheral device. Memory Manager: Memory Manager Coordinates occupation of main memory by different processes and their data. May create virtual memory: a process ‘sees’ memory cells 0 to 2N –1 (N large) of which 0 to 2M –1 are main memory 2M to 2N –1 are on the hard disk. Scheduler: Scheduler Tasks: record processes in the system, introduce new processes, remove processes that are complete. Process table: a list of processes in the system and their properties, e.g. memory area, priority, ready or waiting. Best way of assigning priorities? Dispatcher: Dispatcher Task: runs those processes which are ready to run. Time slice: short time (~50 ms) during which a single process is run. Each process takes its turn to run for a time slice. Aim: to prevent a single long running process from blocking other processes. Deadlock: Deadlock Deadlock occurs when two or more processes are blocked from progressing because each is waiting for a resource which is allocated to the other. Example: process 1 is allocated the printer and requests the CD player; process 2 is allocated the CD player and requests the printer. Necessary Conditions for Deadlock: Necessary Conditions for Deadlock There is competition for a non-shareable resource. Resources are requested partially rather than all at once. Once allocated a resource cannot be forcibly retrieved. Solutions to Deadlock: Solutions to Deadlock Deadlock detection and correction (e.g. kill a process) Convert non-shareable resources into shareable (e.g. spooling). Allocate resources to a process entirely or not at all. Example: Example Five philosophers are sitting at a round table. In front of each is a plate of spaghetti. There are five forks on the table, one between each pair of plates. Each philosopher is either thinking or eating. To eat a philosopher requires both the forks that are adjacent to his plate. Identify the possibilities for deadlock.