Operating Systems: Internals and Design Principles Chapter 1 Computer System Overview Seventh Edition By William Stallings
Course Outline & Marks Distribution Hardware Before mid Memory After mid Linux Scripting C/C# programming Process Before mid Deadlock Before and after mid Scheduling Before and after mid
Course Outline & Marks Distribution Quizzes = 4 (each of 2.5 marks) Assignments Programming =3 (each of 2 marks) Reading/ writing=3 (each of 2 marks) Term Report=1 (of 8 marks) Midterm Final Term Text Book: Operating Systems by William Stalling Reference: 1. Tanenbaum's "Modern Operating Systems", 2 nd or 3 rd Edition 2. Operating System Principles (7 th edition) by Silberschatz
Objectives The students will be able to: Learn the role of system software s Learn the theory of how operating systems are constructed. Develop practical skills that can help to understand and to modify the coding of operating systems(minix, Unix) Learn the use of middleware in the combination with Operating systems. Acquire the knowledge of various kinds of operating systems Learn the concept of THREADS that will be helpful for the students interested in CLIENT-SERVER applications.
Internals and Design Principles What we learn this week. What is an Operating System? Basic Elements. Instruction Execution. Interrupt I/O Memory
Operating System An operating system (OS) is the interface between the user and the hardware An OS provides standard services (System calls ) which are implemented on the hardware, including: Processes, I/O devices, CPU scheduling, memory management, file system, networking A Manager allocates resources efficiently and fairly, protects users from each other, provides safe and secure communication
Goals of Operating System System view
Goals of Operating System Exploits the hardware resources of one or more processors (cores) Goals Convenience Execute user programs and make solving user problems easier. Make the computer system convenient to use. To use the computer hardware in an efficient manner. Efficiency
Basic Elements
Logical Units Graphical Processing Unit: Provide efficient computation on arrays of data using Single-Instruction Multiple Data (SIMD) techniques. Used for general numerical processing.physics simulations for games. Computations on large spreadsheets Digital Signal Processor: Deal with streaming signals such as audio or video. Used to be embedded in devices like modems. Encoding/decoding speech and video.support for encryption and security System on a Chip: Components such as DSPs, GPUs, codecs and main memory, in addition to the CPUs and caches, are on the same chip
Instruction Execution Processor Reads the instruction From main memory Processor Executes each instruction A program consists of a set of instructions stored in memory A CPU Cycle refers to a single pulse of the computer clock. For example, a 4 Mhz CPU will have 4 million CPU cycles per second.
Characteristics of a Hypothetical Machine
Program Execution load 940 add 941 Store 940
Interrupts Deviation from the normal sequencing of the processing Provided to improve processor utilization most I/O devices are slower than the processor processor must pause to wait for device wasteful use of the processor
Interrupts
Program Timing: Short I/O Wait
Example Time Sequence of Multiple Interrupts
Memory Hierarchy Major constraints in memory amount speed Expense (cost) Less capacity, Fast access speed Greater capacity, Slower access speed
Memory Types 1. Registers 1 KB 2. Cache (SRAM) 1 MB 3. Main Memory 512 MB 4. Disk 40 GB 5. Magnetic tape 1TB 6. Removable media 4GB Cache is the smallest memory placed between main memory and processor Invisible to OS Contains a copy of a portion of main memory Processor first checks cache Secondary Memory: Also referred to as auxiliary memory External Nonvolatile Used to store program and data files Primary memory is computer memory that is accessed directly by the CPU
Cache and Main Memory Disk Cache: A portion of main memory used as buffer to (temporarily) hold data (for disk)
cache size number of cache levels block size Main categories are: write policy mapping function replacemen t algorithm
DMA Direct Memory access 3- CPU involves in the beginning &ending 4- Free to perform other operations CPU Cache More efficient than interruptdriven or programmed I/O Memory 2- Interrupt is sent when task is done. Device 1- Transfers a block of memory w/o going through CPU
Multicore Computer Also known as a chip multiprocessor Combines two or more processors (cores) on a single piece of silicon (die) each core consists of all of the components of an independent processor In addition, multicore chips also include L2 cache and in some cases L3 cache
Intel Core i7 Figure 1.20 Intel Corei7 Block Diagram
Summary Basic Elements processor, main memory, I/O modules, system bus GPUs, SIMD, DSPs, SoC Instruction execution processor-memory, processor-i/o, data processing, control Interrupt/Interrupt Processing Memory Hierarchy Cache/cache principles and designs Multiprocessor/multicore