5.1 Advanced Operating Systems Operating Systems Bugs Linux's code has been significantly growing during last years. Is this code bugs free? Obviously.

Slides:



Advertisements
Similar presentations
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Advertisements

Paging: Design Issues. Readings r Silbershatz et al: ,
CS510 – Advanced Operating Systems 1 The Synergy Between Non-blocking Synchronization and Operating System Structure By Michael Greenwald and David Cheriton.
Week 7 - Friday.  What did we talk about last time?  Allocating 2D arrays.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development.
Linux vs. Windows. Linux  Linux was originally built by Linus Torvalds at the University of Helsinki in  Linux is a Unix-like, Kernal-based, fully.
A. Frank - P. Weisberg Operating Systems Process Scheduling and Switching.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Type-Safe Programming in C George Necula EECS Department University of California, Berkeley.
Nooks: an architecture for safe device drivers Mike Swift, The Wild and Crazy Guy, Hank Levy and Susan Eggers.
OS Spring 2004 Concurrency: Principles of Deadlock Operating Systems Spring 2004.
Introduction to Kernel
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
OS Fall’02 Concurrency: Principles of Deadlock Operating Systems Fall 2002.
MULTIVIE W Checking System Rules Using System-Specific, Program-Written Compiler Extensions Paper: Dawson Engler, Benjamin Chelf, Andy Chou, and Seth Hallem.
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
Process Description and Control A process is sometimes called a task, it is a program in execution.
Chapter 11 Interrupt Interface of the 8088 and 8086 Microcomputer
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
1 CSC 2405: Computer Systems II Spring 2012 Dr. Tom Way.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Real-Time Concepts for Embedded Systems Author: Qing Li with Caroline Yao ISBN: CMPBooks.
Experience with Processes and Monitors in Mesa
Kernel, processes and threads Windows and Linux. Windows Architecture Operating system design Modified microkernel Layered Components HAL Interacts with.
A Survey of Dynamic Techniques for Detecting Device Driver Errors Olatunji Ruwase LBA Reading Group 18 th May 2010.
Cosc 4740 Chapter 6, Part 3 Process Synchronization.
ICS 145B -- L. Bic1 Project: Main Memory Management Textbook: pages ICS 145B L. Bic.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Pointers OVERVIEW.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
Operating System 2 Overview. OPERATING SYSTEM OBJECTIVES AND FUNCTIONS.
Smashing the Stack Overview The Stack Region Buffer Overflow
1 Homework HW5 due today Review a lot of things about allocation of storage that may not have been clear when we covered them in our initial pass Introduction.
6.1 Advanced Operating Systems Lies, Damn Lies and Benchmarks Are your benchmark tests reliable?
CMSC 202 Advanced Section Classes and Objects: Object Creation and Constructors.
4P13 Week 12 Talking Points Device Drivers 1.Auto-configuration and initialization routines 2.Routines for servicing I/O requests (the top half)
Functions Functions, locals, parameters, and separate compilation.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
UDI Technology Benefits Slide 1 Uniform Driver Interface UDI Technology Benefits.
MINIX Presented by: Clinton Morse, Joseph Paetz, Theresa Sullivan, and Angela Volk.
CSC 660: Advanced Operating SystemsSlide #1 CSC 660: Advanced OS Synchronization.
An Empirical Study of OS Errors Chou, Yang, Chelf, Hallem, and Engler SOSP 2001 Characterizing a workload w.r.t reliability.
Real-Time Operating Systems RTOS For Embedded systems.
WORKING OF SCHEDULER IN OS
File-System Management
Threads Some of these slides were originally made by Dr. Roger deBry. They include text, figures, and information from this class’s textbook, Operating.
Introduction to Kernel
Presented by: Daniel Taylor
Microprocessor Systems Design I
LINUX WINDOWS Vs..
Chapter 2: System Structures
Functions, locals, parameters, and separate compilation
CS703 - Advanced Operating Systems
Chapter 18 Software Testing Strategies
LINUX WINDOWS Vs..
What is an Operating System?
Storage.
Design and Programming
CS703 - Advanced Operating Systems
Chapter 2: The Linux System Part 3
Lecture Topics: 11/1 General Operating System Concepts Processes
Exception Handling Imran Rashid CTO at ManiWeber Technologies.
CSE 542: Operating Systems
Outline Operating System Organization Operating System Examples
COMP755 Advanced Operating Systems
Mr. M. D. Jamadar Assistant Professor
SPL – PS3 C++ Classes.
Presentation transcript:

5.1 Advanced Operating Systems Operating Systems Bugs Linux's code has been significantly growing during last years. Is this code bugs free? Obviously no. How many bugs does Linux have? How long do they live?

5.2 Advanced Operating Systems Linux Kernel Size Linux kernel has some main components: –drivers (Device Drivers). –fs (File System). –net (Networking). –Other (Main Kernel, Memory Management, IPC and Architecture Specific Code). The kernel size has grown from about 105K lines on version 1.0 (1994) to about 1.6M lines on version (2001). The size of the device drivers code is always more than a half of the whole kernel and can reach even 70%.

5.3 Advanced Operating Systems Linux Kernel Division

5.4 Advanced Operating Systems Types of Bugs on Version Null – No check for potentially NULL pointers returned from functions. –391 instances. Block – Causing deadlock by calling of blocking function with interrupts disabled or spinlock held. –293 instances. Var – Allocation of large stack variables (>1K) on the fixed size kernel stack. –102 instances. Inull - Inconsistent assumptions about whether a pointer is NULL. –69 instances.

5.5 Advanced Operating Systems Types of Bugs (Cont.) Range – No check for bounds of array indices or loop bounds derived from the user data. –54 instances. Intr – Disabled interrupts has not been restored. –27 instances. Lock - No release of acquired locks; or a double-acquire lock. –26 instances. Free – Reuse of freed memory. –17 instances. Other – 46 instances.

5.6 Advanced Operating Systems Where are the Bugs?

5.7 Advanced Operating Systems Device Driver Bugs Device Drivers are the buggiest section of the kernel. –Over 90% of Block, Free and Intr. –Over 70% of Lock, Null and Var. Device Drivers have 3 to 7 times (depends on the bug) higher error rate than the rest of the kernel code. Device Drivers are written by many developers who may understand the device more than the kernel. Only a few users may have a given device.

5.8 Advanced Operating Systems Bugs Distribution On 2002 Chou showed that the distribution of bugs is according to the formula: This means that more than 60% of the files of the kernel code contain at least one bug and more than 20% contain at least 2 bugs.

5.9 Advanced Operating Systems Bugs Distribution (Cont.) O – Actual Bugs, X – Expected Bugs

5.10 Advanced Operating Systems Bugs Clusters Many bugs are not independent. One file usually written by one programmer. Poor programmers writes buggy code, with no specific reason. Some programmers are unaware of relevant system rules. A seldom executed code is more likely to have bugs.

5.11 Advanced Operating Systems Cut-and-Paste bugs Cut-and-Paste bugs are very common in device drivers and elsewhere. On 2004 Li reported on 28 Cut-and-Paste bugs in Linux kernel (2.6.6) and 23 in FreeBSD kernel. On 2001 Chou reported on one source file of Linux device driver that has 35 bugs whereas 34 out of them are Cut-and-Paste bugs. –one of the bugs was copied 24 times and the other 10 times. "working" code is not always a correct one and it is not always placed in the right context.

5.12 Advanced Operating Systems Bugs Lifetime

5.13 Advanced Operating Systems Bugs Lifetime Statistics On 2001 Chou gave these figures: The average bugs Lifetime is 1.8 years. The median is 1.25 years. The average age of a bug is 1 year. –The explanation for this young age is the many newborn bugs. Most of the bugs are fixed quickly. There are a few who make the average higher.

5.14 Advanced Operating Systems Where do Bugs Stem From?

5.15 Advanced Operating Systems Bugs' Way of Life

5.16 Advanced Operating Systems What about Microsoft? The code of Microsoft is commercial; hence confidential. On 2001 Murphy from Microsoft Research Center in Cambridge UK gave some details (they are on next slide); however, no absolute numbers, just percents. On 2003 Swift claimed that the Device Drivers of WindowsXP are the reason for 85% of the failures.

5.17 Advanced Operating Systems Windows Failures WindowsNT fails because of: –16% Microsoft Device Drivers. –16% External Device Drivers. –43% Internal Kernel faults. –25% other (HW failures etc.). Windows2000 fails because of: –7% Microsoft Device Drivers. –20% External Device Drivers. –34% Internal Kernel faults. –39% other (HW failures etc.).