M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering...

11
M.N. Rao

Transcript of M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering...

Page 1: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

M.N. Rao

Page 2: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

Fundamentals of Open Source Software

Page 3: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College
Page 4: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

Fundamentals of Open Source Software

M.N. RAOProfessor

Computer Science and EngineeringCentre for Research and Development

SCET Engineering CollegeNarsapuram, Andhra Pradesh

Delhi-1100922015

Page 5: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

FUNDAMENTALS OF OPEN SOURCE SOFTWAREM.N. Rao

© 2015 by PHI Learning Private Limited, Delhi. All rights reserved. No part of this book may be reproduced in any form, by mimeograph or any other means, without permission in writing from the publisher.

PERL is copyright by Copyright © 1989, GNU-GPL, Free Software Foundation, Inc., USA.Linux is a trademark owned by Linus Torvalds, administered by the Linux Mark Institute.PHP is copyright by the PHP License, Version 3.01, Copyright © 1999–2012 The PHP Group.Python is copyright by the Python Software Foundation—PSFL.MySQL is developed by Oracle (formerly Sun), Licensed by GNU General Public Licensed (Version 2).Android is developed by Google Inc. and Open Handset Alliance, Licensed by GNU General Public Licensed (Version 2).

ISBN-978-81-203-5012-0

The export rights of this book are vested solely with the publisher.

Published by Asoke K. Ghosh, PHI Learning Private Limited, Rimjhim House, 111, Patparganj Industrial Estate, Delhi-110092 and Printed by Mudrak, 30-A, Patparganj, Delhi-110091.

Page 6: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

To My Parents Sri M.L. Narayana and Satyavathi

My Wife BhargaviOur Son Revanth

and My Sisters Vijaya and Malathi

Page 7: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College
Page 8: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

Contents

Preface xviiAcknowledgements xix

Chapter 1 An Introduction to OSS 1–10

1.1 Introduction 1 1.2 Need for Open Source Applications 2 1.2.1 Advantages of Free Open Source Software 2 1.2.2 Disadvantages of Free Open Source Software 2 1.3 History 3 1.4 Meaning and Extraction of the Terms Free Software and Open Source Software 3 1.5 Free Software Foundation and Open Source Initiative Presentation 4 1.5.1 Free Software and Open Source Software Licences Comparison 4 1.5.2 Licencing 4 1.5.3 Familiar Licences 5 1.5.4 Free and Open Source Software (Game Theory) 5 1.6 Security and Reliability 6 1.7 Economical Aspects and Adoption 7 1.8 Applications of Open Source Software 7 1.8.1 Science 7 1.8.2 Mathematics 8 1.8.3 Computer Simulation 9 1.8.4 Statistics 9 1.8.5 Surveys 9 1.9 Recapitulation 9 Review Questions 10

Chapter 2 Linux Basics 11–41

2.1 Introduction 11 2.1.1 Setting Up Environment 12 2.1.2 Simple C File—C Compilation 13

vii

Page 9: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

viii  Contents

2.2 Kernel/User Mode 15 2.2.1 Basic Commands 15 2.3 Process 18 2.3.1 Types of Processes 19 2.3.2 Types of Identifiers Related to a Process 19 2.3.3 Process States 20 2.3.4 Creation of Process 20 2.4 Advanced Concept-Scheduling 23 2.4.1 Objectives of Scheduling 23 2.4.2 Categories of Processes 24 2.4.3 Types of Processes 24 2.4.4 Process Priorities 24 2.4.5 Scheduling Policies 25 2.4.6 A Data Structure Used by the Scheduler 25 2.4.7 Scheduling in Multiprocessor Systems 25 2.5 Personalities 25 2.6 Cloning 26 2.6.1 Use of clone() 26 2.7 Signals 26 2.7.1 Types of Signals 27 2.7.2 Sending Signals 28 2.7.3 Receiving Signals 28 2.7.4 Blocking Signals 28 2.8 Development with Linux 30 2.9 OSS Installation 34 2.9.1 Phases of Compilation 35 2.9.2 Debugging with GNU Debugger 35 2.9.3 Library Functions and System Calls 36 2.9.4 System Calls When Working with Files and Directories 36 2.10 Recapitulation 40 Review Questions 40 Suggested Readings 41

Chapter 3 Android 42–68

3.1 Introduction 42 3.2 Open Source Android Platform 42 3.3 History 43 3.4 Android Architecture 43 3.4.1 Features of Andoid Architecture 44 3.5 Android Versions 45 3.5.1 Pre-commercial Android Versions 45 3.5.2 Commercial Versions of Android 46 3.6 Dalvik Virtual Machine (DVM) 47 3.6.1 Characteristics of DVM 47 3.7 Installing Eclipse ADT Plug-In and Android SDK Packages 48

Page 10: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

Contents  ix

3.8 Android Virtual Device or Emulator 49 3.8.1 Executing the Android App on the Emulator 50 3.9 Hello World App 51 3.10 File System Hierarchy 52 3.11 Building APK Expansion Files 55 3.12 Android Sample Apps 55 3.13 Recapitulation 66 Review Questions 67 Suggested Readings 68

Chapter 4 PHP Basics 69–97

4.1 Introduction 69 4.1.1 Setting up Environment 69 4.1.2 PHP Script Execution: Interaction of Web Browser and Web Server 70 4.1.3 Basic Syntax for PHP 70 4.2 Identifiers 70 4.2.1 Limitations of Identifiers 71 4.2.2 Keywords 71 4.3 Variables 71 4.3.1 Scope of Variables 72 4.4 Constants 74 4.4.1 Comments in PHP 74 4.4.2 Output Functions 74 4.5 Data Types 75 4.5.1 Typecasting 77 4.5.2 Embedding PHP in HTML 77 4.5.3 Expression 78 4.6 Operators 78 4.6.1 Arithmetic Operators 78 4.6.2 Assignment Operators 79 4.6.3 Bitwise Operators 80 4.6.4 Incrementing/Decrementing Operators 81 4.6.5 Comparison Operators 81 4.6.6 Logical Operators 82 4.6.7 String Operators 83 4.6.8 Array Operators 83 4.6.9 Operator Precedence and Associativity 84 4.7 Statements 85 4.7.1 Conditional Statements in PHP 85 4.8 PHP Loops 90 4.8.1 While Loop 90 4.8.2 Do-While Loop 91 4.8.3 For Loop 91 4.8.4 Foreach Loop 92 4.8.5 Break Statement 93

Page 11: M.N. Rao - kopykitab.com of Open Source Software M.N. RAO Professor Computer Science and Engineering Centre for Research and Development SCET Engineering College

Fundamentals Of Open Source Software:A Developer'S Perspective

Publisher : PHI Learning ISBN : 9788120350120 Author : RAO, M.N.

Type the URL : http://www.kopykitab.com/product/7677

Get this eBook

30%OFF