In the last few decades, the developments in Operating System (OS) have brought to focus the concepts of process concurrency, low power design, security, etc. along with refined and matured approach for the conventional topics like processes, interrupts, semaphores. However, illustrations of these concepts and techniques in the program design form are either confined to research articles or not given due importance in many textbooks. A system programming subject like OS should cover program design illustrations and guidance along with emphasis on new concepts. The major focus of this book is to explain the OS concepts and techniques with illustrations of program design. It is the outgrowth of my teaching the subject for a decade to the Computer Science students of Indian Statistical Institute, Kolkata.
The Operating System is, in fact, a concurrent program having distinguishing features that do not conform to conventional sequential programs. In order to expose the basic concepts I have introduced ideas from a beginner¡¯s point of view extended to the level of professional system programmers interested to introduce new features in their systems. The distinguishing feature of this book is the inclusion of C language programs for the OS routines that are successfully tested in Linux Operating System. The text covers a large number of examples illustrating definition, concepts, and procedures.
The book is organized in 13 chapters with Chapter 1 introducing the basic ideas along with two illustrative programs. The first program deals with various system calls to establish the point that an OS is really a system call driven program. The next program demonstrates the design concepts in a form similar to a typical UNIX environment.
Chapters 1 and 2 provide all the important prerequisites needed for understanding the current scenario of OS principles and design. Chapter 2 discusses the interrupt driven features in
xiii
... .......
mainframes and in PCs. Moreover, it also gives the top down (pyramid like) design aspects from the very assembly level to the GUI level of users. The chapter contains the descriptions (required for understanding the programs demonstrated in this book) of ¡®system calls¡¯ for IPC (Inter Process Communication) in POSIX standard (UNIX System V compliant) OS.
Chapter 3 analyses the ¡®process¡¯ concept, which is the live entity of the control program design. Along with other notions, it includes every aspect of the concurrent program and inter process communications.
Chapter 4 explains the scheduling algorithms including the program design form of the most complicated and versatile multilevel feedback queue-scheduling algorithm.
While Chapter 5 discusses the various synchronization aspects of processes and their modularization, Chapter 6 presents the deadlock problem of the OS. Chapters 7 and 8 broadly deal with the main memory management part of the OS, explaining concepts such as paging, page fault, and virtual memory with the development of various programs.
Chapters 9 and 10 are exclusively devoted to a discussion on device management and file management, respectively. ReiserFS is a file system using a plug-in-based object oriented variant on classical balanced tree algorithms. It is increasingly being researched and considered to be an asset, and is included in the appendix of Chapter 10. Chapter 11 elucidates how to design device drivers thoroughly and mount it on to the existing operating system. This integrated design approach may be emulated to design any other OS routine and correctly attach it for the increased performance and smother operation of the overall computer system.
Due to the widespread use of open systems, UNIX and its clones, it is possible to write codes to be run in the kernel space and thus one can get access to the very sensitive part of the OS. So the designer should look into every aspect of kernel abusing including the viruses. Chapter 12 elucidates how one can guard against hacking Linux and its clones. (Of course, this is not meant for improper usage. It is meant for the designer to take proper guard against the ¡®hackers¡¯!). This will undoubtedly help design more secured system.
Low power has become an important requirement not only for various battery operated embedded Linux platforms, but also for high performance processors or peripherals. Chapter 13 investigates the low power system design from various angles and identifies the overall system design consisting of several levels, each drawing major attention from OS for the low power design.
This book is designed as a textbook for the students of B.Tech./M.Tech. (Computer Science and Information Technology), MCA and BCA, and M.Sc. and B.Sc. (Computer Science). Students of other engineering departments needing help from computers can also use this book. In addition, it will also serve as a reference book for scientists and researchers in various other disciplines.
Operating systems nowadays should attain the quality of program construction found in large software projects involving software engineering aspects. The top-down approach adopted for large software systems will eventually be used to concentrate on innermost components in the simple form. This book will give a thrust in this direction.
Any constructive criticisms from the readers will be highly appreciated.
Pabitra Pal Choudhury
................
I am grateful to all my colleagues, research scholars and students for their helpful comments and suggestions while writing this book. Special mention must be made of Sudhakar Sahoo, Subhamoy Maitra, Palash Sarkar, Pranab Chakraborty, Subhasish Majumder, Sanjeev Kumar Mishra, Rajib Verma, Arnab Nandy, A. Raouf Khan, Soubhik Chakraborty, Amal Kumar Ghosh, Sk. Sarif Hassan to name a few, who played a constructive role in the evolution of this book. I thank all the M.Tech students of my Institute during 1990¨C2000, when I started teaching Operating System to them. I would not have been able to complete this book without the active participation of my students Archan, Saugata, Amitabh and Reenee.
I am indebted to Prof. Bhabani Prasad Sinha, Prof. Bimal Roy, Prof. B.B. Bhattacharya, Prof. K.S. Vijayan, Prof. Anis Mukhopadhyay, Prof. Sankar K. Pal, Prof. B.B. Choudhury, and Prof. Swadhinananda Pattanayak and all other collegues of my institute for their valuable suggestions and inputs.
Finally, I am grateful to my elder brother, Prof. Parimal Pal Chaudhuri and sister-in-law Dr. Jayashree Pal Chaudhuri and all other relatives including Mrs. Urmila Paul and Late Dr. Kumud Ranjan Paul who formed the source of my academic driving force and inspiration. I also remain grateful to my wife Chandrima and children Prakriti and Parichoy for their unconditional support with pleasant and silent endurance.
Pabitra Pal Choudhury