Operating System Fundamentals

3y ago
125 Views
8 Downloads
969.50 KB
108 Pages
Last View : Today
Last Download : 3m ago
Upload by : Shaun Edmunds
Transcription

Biyani's Think TankA concept based exclusive materialOperating SystemFundamentalsBCA Part-IPoonam SharmaUpdated by: KarunaMCA, M.Sc. (IT)Revised By: Ms EktaLecturerDeptt. of Information TechnologyBiyani Girls College, Jaipur

2Published by :Think TanksBiyani Group of CollegesConcept & Copyright :Biyani Shikshan SamitiSector-3, Vidhyadhar Nagar,Jaipur-302 023 (Rajasthan)Ph : 0141-2338371, 2338591-95 Fax : 0141-2338007E-mail : acad@biyanicolleges.orgWebsite :www.gurukpo.com; www.biyanicolleges.orgISBN: 978-93-81254-39-4Edition : 2011Price :While every effort is taken to avoid errors or omissions in this Publication, anymistake or omission that may have crept in is not intentional. It may be taken note ofthat neither the publisher nor the author will be responsible for any damage or loss ofany kind arising to anyone in any manner on account of such errors and omissions.Leaser Type Setted by :Biyani College Printing Department

Operating System Fundamentals3PrefaceIam glad to present this book, especially designed to serve the needs of thestudents. The book has been written keeping in mind the general weakness inunderstanding the fundamental concepts of the topics. The book is self-explanatory andadopts the “Teach Yourself” style. It is based on question-answer pattern. The languageof book is quite easy and understandable based on scientific approach.Any further improvement in the contents of the book by making corrections,omission and inclusion is keen to be achieved based on suggestions from the readersfor which the author shall be obliged.I acknowledge special thanks to Mr. Rajeev Biyani, Chairman & Dr. Sanjay Biyani,Director (Acad.) Biyani Group of Colleges, who are the backbones and main conceptprovider and also have been constant source of motivation throughout this Endeavour.They played an active role in coordinating the various stages of this Endeavour andspearheaded the publishing work.I look forward to receiving valuable suggestions from professors of variouseducational institutions, other faculty members and students for improvement of thequality of the book. The reader may feel free to send in their comments and suggestionsto the under mentioned address.Author

4SyllabusB.C.A. Part-IOperating System FundamentalsNecessity of an Operating system; Operating System Terminology, Evolution ofOperating Systems (Multiprogramming Systems, Batch Systems, Timesharing System,Process Control and Real-Time System). Factors in OS Design (Performance, Protectionand Security; Correctness, Maintainability, Application Integration, Portability andInteroperability).Device Management : General Device Characteristics, I/O Programming Concepts,Device Controllers, Device Drivers, Interrupts Driven I/O System Organization, DirectI/O with Polling, Interrupts Driven I/O, Memory Mapped I/O, Direct Memory Access,Buffering, Device Drivers Interface, CPU Device Interaction, I/O Optimization, DeviceManagement Scenarios (Serial Communications, Sequentially Accessed StorageDevices, Randomly Accessed Devices).Process Management : Process Definition, Process Control, Initializing OperatingSystem, Process Address Spaces, Process Abstraction, Resource Abstraction and ProcessHierarchy.Scheduling Mechanisms, Partitioning a Process into Small Processes, Non-PreemptiveStrategies (First come-First Served, Shortest Job Next, Priority Scheduling, DeadlineScheduling), Preemptive strategies (Round Robin, Two Queues, Multiple LevelQueues).Basic Synchronization Principles : Interactive Processes, Coordinating Processes,Semaphores, Shared Memory Multiprocessors, AND Synchronization, Inter-processCommunication, Inter-process Messages, Mailboxes.Deadlocks, Resource Status Modeling, Handling Deadlocks, Deadlock Detection andResolution Deadlock Avoidance.

Operating System Fundamentals5Memory Management : Requirements on the Primary Memory, Mapping the AddressSpace to Primary Memory, Dynamic Memory for Data Structures, Memory Allocation(Fixed Partition Memory Allocation Strategy), Dynamic Address Relocation, MemoryManager Strategies (Swapping, Virtual Memory, Shared Memory Multiprocessors).Virtual Memory : Address Translation Paging, Static and Dynamic Paging Algorithms.Information Management : Files (Low Level Files, Structured Files, DatabaseManagement Systems, Multimedia Storage). Low Level File Implementation. StorageAbstraction (Structure Sequential Files, Indexed Sequential Files, Database ManagementSystems, Multimedia Documents). Memory Mapped Files, Directories, DirectoryImplementation, File Sharing, Sharing Information Across Network, Remote Virusesand Worms, Security Design Principles, Authentications, Protection Mechanisms,Encryption, Protection of User Files.Distributed Computing : Distributed Process Management, Message Passing, anagement,SecurityinDistributed

6ContentS.No.1.Name of TopicExamination Paper 2007Operating System Introduction1.1Introduction to Operating System1.2Necessity of an Operating System1.3Evolution of Operating System1.4Factors in OS Design2.Process Management2.1Process Definition2.2Process States2.3Process Control Block2.4Process Address Spaces2.5Process Hierarchy3.Scheduling Mechanisms3.1Requirement of CPU Scheduling3.2CPU Bound and I/O Bound Processes3.3Scheduling Queues3.4Types of Schedulers Criteria3.5Performance Criteria for Scheduling Mechanism3.6Non-Preemptive Scheduling Mechanism3.7Preemptive Scheduling Mechanisms4.Basic Synchronization Principles4.1Concept of Synchronization4.2Co-operating Processes4.3Semaphores and its Usage4.4AND Synchronization4.5Inter-process Communication4.6Direct and Indirect Inter-process CommunicationDeadlocks5.

Operating System Fundamentals5.15.25.35.45.55.65.76.Device roduction to DeadlockNecessary Conditions for DeadlockHandling DeadlocksDeadlock PreventionDeadlock AvoidanceDeadlock DetectionRecovery from DeadlockConcept of Device ManagementGeneral Device CharacteristicsData Transfer Schemes between CPU and I/ODevicesSynchronous and Asynchronous Data TransferDevice ControllerDevice DriversInterruptsDirect I/O and Memory Mapped I/OBufferingDirect Memory Access (DMA)I/O Optimization TechniquesMemory Management7.1Logical v/s Physical Address Space7.2Memory Allocation Techniques7.3External and Internal Fragmentation7.4Swapping7.5Virtual Memory7.6Paging7.7Demand Paging7.8Page Replacement Algorithm7

88.Information Management8.1Files8.2Contiguous, Linked and Indexed Allocation8.3Directories8.4Types of Directory8.5Sharing Information Across the Network8.6Remote Disk System8.7Remote File System8.8File Level Caching8.9Security Threats8.10Viruses and Worms8.11Security Design Principles8.12Authentication8.13Protection Mechanisms8.14Encryption9.Distributed Systems9.1Distributed Systems Definition9.2Advantages of Distributed Systems9.3Distributed Process Management9.4Message Passing System9.5RPC9.6Memory Management in DistributedEnvironment9.7Security Requirements of Distributed Systems10.Unsolved Papers 2011 to 2006

Operating System Fundamentals9CHAPTER-1COperating System IntroductionQ.1What is the difference between Application and System Software?Ans.: Application Software and System Software : The Application Software is asoftware developed to provide solutions to a particular appli cation. Thesesoftwares are usually developed for a specific area, they cannot be used in otherapplication areas.For example - Tally for Accounting, MS-Word for Word Processing etc.While the System Software helps in controlling the internal processing of thecomputer, these softwares provide a general programming environment inwhich programmers can write applications to suit their needs.Examples of System Software are - Operating Systems, Language Translators etc.Q.2What do you mean by Operating System?Ans.: Operating System : An Operating System is a program that acts as anintermediary between a user of a computer and the computer hardware.The purpose of an Operating System is to provide an environment in which auser can execute program. An Operating System is an important part of almostevery Computer System.It is basically a control program that controls the execution of user programs toprevent errors and improper use of the computer.Q.3What is the necessity of an Operating System?Ans.: Necessity of an Operating System : Computer System performs all the taskswith the help of hardware and software jointly. To use computer in different

10application areas, a user has to write proper software. A user who is writing aprogram or a software need to know about details of hardware, which is a verydifficult task. Therefore there should be an intermediate component betweenuser and computer hardware.The execution of all commands given by the user and all instructions given byvarious softwares are the responsibility of Operating System.Operating System provides various services like program execution, I/Ooperations, resource allocation etc. for convenience of user or efficient operationsof system itself.Q.4Write in brief about the Evolution of Operating System.Ans.: Evolution of Operating System : The evolution of various types of operatingsystems can be briefly described as follows :(1)Batch System : This type of Operating System was used in the earlier age.To speed up processing, jobs with similar needs were batched togetherand were run through the computer as a group. The definitive feature of abatch system is the lack of interaction between the user and the job whilethat job is executing. In this execution environment, the CPU is often idle.(2)Multiprogramming System : In this type of Operating System, more thanone programmes will reside into main memory. The Operating Systempicks and begins to execute one of the jobs in the memory. Eventually, thejob may have to wait for some task, the Operating System simply switchesto and executes another job. When the first job finishes waiting and getsthe CPU back. As long as there is always some job to execute, the CPUwill never be idle.(3)Time Sharing System : A Time-Shared Operating System allows themany users to share the computer simultaneously. A time-sharedOperating System uses CPU scheduling and multiprogramming toprovide each user with a small portion of a time-shared computer.(4)Real Time Operating System : Real Time Operating System is a specialpurpose Operating System, used when there are rigid time requirementson the operation of a processor or the flow of data.

Operating System FundamentalsQ.511(5)Process Control System : Process Controls are dedicated Systems. Theyare dedicated to single application. Thus there is no need to managesharing among concurrent application programs.(6)Distributed System : A Distributed System is an interconnection of two ormore nodes, but the processors do not share memory. These Systems arealso called as loosely Coupled Systems.Explain the various factors which should keep in mind while designing theOperating System.Ans.: When we are designing an Operating System, we need to keep in mind certainimportant factors. The few important factors are :(i)Performance(ii)Protection and ication integration(vi)Portability(vii)Interoperability

12Multiple choice QuestionQ1. The operating system which the IBM –PC uses:A. CP/MB. MS-DOSC. UNIXD. AT-DOSQ2.Most operating system are designed to run with a specific:A. Type of processorB. Manufacturer’s printerC. Brand of computerD. Style of keyboardQ3.A technique that can be used when a very long program exceeds the storagescapacity of memory is called:A. WindowingB. Time sharingC. Linkage editingD. Virtual memoryQ4.An operating system designed for uase on both PC’s at home andon serversinbusiness is:A. Windows XPB. Windows MEC. Windows NTD. Windows CE

Operating System FundamentalsQ5. The address, which CPU ,generates is called as:A. Physical addressB. Actual addressC. Logical addressD. None of the above13

14CHAPTER-2CProcess ManagementQ.1Write the Definition of Process.Ans.: Process Definition : In general, a process is a program in execution. Theexecution of a process progresses in a sequential fashion. Thus a process is anactive entity with a program counter, specifying the next instruction to beexecuted and a set of associated resources.Q.2Explain the different States of Process with example.ORDescribe about the Life Cycle of a Process.Ans.: Process States : The various stages through which a process passes is called itsLife Cycle and this Life Cycle of a process can be divided in to several stagescalled as “Process States”. When a process starts execution, it goes through onestate to another state. Each process may be in one of the following states nningExplain the Process Control Block (PCB) with diagram.Ans.: Process Control Block (PCB) : To control the various processes the OperatingSystem maintains a table called the Process Table. The Process Table containsone entry per process. These entries are referred to as “Process Control Block”.It contains many pieces of information related with a specific process including

Operating System Fundamentals15the Process Number, Process State, Program Counter, CPU Registers, CPU SchedulingInformation, Memory Management Information, Accounting Informa tion, and I/OStatus Information.Q.4Explain the Process Address Space in brief.Ans.: Process Address Space : When we write programs, very frequently we usedefined libraries (programs). When we execute a program then an executableprogram is prepared by linking the modules. The procedure for linking themodules are defined in a linear address space in which all parameters ofcomputation are referred.Thus Address Space is a set of locations used by process to reference. TheAddress Space defines all logical entities used by process and specifies addressesby which they are referred.Q.5What do you understand by Process Hierarchy?Ans.: Process Hierarchy : Operating System needs some way to create and killprocesses. When a process is created, it creates another process which in turncreates some more processes and so on. Thus it forms a Process Hierarchy orProcess Tree. In this hierarchy a child process can have only one parent processwhere as a parent process can have multiple child processes.

16Multiple Choice QuestionsQ1. Process Manager is responsible forA. Scheduling of processB. SynchronizationC. deadlock handlingD. AllQ2. PCB stands forA. Program Control BlockB. Process Control BusC. Program Control BusD. Process Control BlockQ3. Process is aA. ProgramB. HardwareC. Program under executionD. NoneQ4. The various states of process are:A. New, ReadyB. New, Ready, RunningC. New, Running, TerminatedD. New, Ready, Running, waiting, TerminatedQ5. The various queues areA. Job QueueB. Ready queueC. Device queueD. AllQ6. CPU resource management is known asA. SchedulingB. I/O ManagementC. SwappingD. None

Operating System FundamentalsQ6. Different way of creating and deleting process areA. FORKB. JOINC. QUITD. AllQ7. Which of the following is also called as lightweight processes:A. FunctionB. Application ModuleC. KernelD. ThreadQ8. Thrashing is related to:A. Cache memoryB. Main memoryC. Secondary memoryD. Virtual me moryQ9. Which of the following is not a system utility?A. CompilerB. InterpreterC. Operating systemD. Inte rnet explorerQ10.FSCAN is a:A. Disk checking mechanismB. Disk clearing mechanismC. Disk formatting mechanismD. Disk scheduling mechanism17

18CHAPTER-3CScheduling MechanismsQ.1What is the requirement of CPU Scheduling? Explain.Ans.: CPU Scheduling : CPU Scheduling is the basis of multi Programmed OperatingSystem. By switching the CPU among the processes, the operating system canmake the computer more productive. The main objective of Scheduling is toincrease CPU utilization and higher throughput.Q.2What is the difference between CPU Bound and I/O Bound Processes?Ans.: I/O Bound Processes : An I/O Bound Process is one that spends more of its timein doing I/O then it spends on doing computation.CPU bound Processes : CPU Bound Processes needs very little I/O, but requiresheavy computation.Q.3What are the different types of Scheduling Queues?Ans.: The Scheduling Queues in the Systems are :(1)Job Queue : As processes enters in the System, they are put into a jobqueue.(2)Ready Queue : The processes that are residing in the main memory andare ready and waiting to execute are kept in the ready queue.(3)Device Queue : This queue contains a list of processes waiting for I/Odevices.

Operating System FundamentalsQ.419Write about the different types of Schedulers.Ans.: Types of schedulers : There are basically three types of schedulers :Q.5(1)Long Term Scheduler : This Scheduler determines which job will besubmitted for immediate processing. It selects from the job pool and loadsthem into memory.(2)Short Term Scheduler : It is also called a CPU Scheduler. It allocatesprocesses belonging to ready queue to CPU for immediate processing.(3)Medium Term Scheduler : It is also called as Memory Scheduler. Duringthe execution processes are swapped-out and swapped-in by the MediumTerm Scheduler.What are the different criteria for measuring the Performance of SchedulingMechanism?Ans.: Performance Criteria for Scheduling Mechanism : The various criteria formeasuring the Scheduler Performance are :(i)CPU UtilizationQ.6(ii)Throughput(iii)(iv)Turnaround TimeWaiting Time(v)Response dPreemptiveSchedulingAns : Non-Preemptive Scheduling Mechanism : A Non-Preemptive SchedulingMechanism selects a process to run and lets it run, until it blocks or until itvoluntarily releases the CPU.Preemptive Scheduling Mechanism : In this category, suspension or preemptionis allowed based on priority.Q.7Explain various Non-preemptive Scheduling Mechanisms.Ans.: Non-Preemptive Scheduling Mechanisms are of four types :-

20Q.8(1)First Come First Served (FCFS) Scheduling : With this scheme, theprocess that requests the CPU first is allocated the CPU first.(2)Shortest-Job First (SJF) Scheduling : In this scheme, job requiring theminimal CPU time is selected first for CPU allocation.(3)Priority Scheduling : In this scheme a priority is associated with eachprocess and the CPU is allocated to the process with the highest priority.(4)Deadline Scheduling : With this scheduling algorithm the process withearliest deadline is given the highest priority for execution.Explain various Preemptive Scheduling Mechanisms.Ans.: Preemptive Scheduling mechanisms are of three types :(1)Round-Robin Scheduling : In this algorithm, a small time slice isassigned to each process. The CPU scheduler goes around the readyqueue, allocating the CPU to each process for a time interval of one timequantum.(2)Two Queue Scheduling : In this approach, the processes are classifiedinto two different groups. One queue is allocated to CPU bound processesand other is allocated to I/O bound processes.(3)Multilevel Queue Scheduling :A Multilevel Queue SchedulingAlgorithm partition the ready queue in to separate queues and each queuehas its own scheduling algorithms.

Operating System FundamentalsMultiple Choice QuestionsQ1. Operating System is a :a. Hardwareb. System Softwarec. Application Softwared. NoneQ2. Which of the following is not an example of Operating System?a. Windows 95b. DOSc. UNIXd. MS WordQ3. Operating System is required to managea. Hardwareb. various resourcesc. memoryd. AllQ4. Factors important for designing of Operating systems area. Maintainabilityb. Portabilityc. securityd. All aboveQ5. Which one is a sequential storage device::A. Hard diskB. Magnetic diskC. Magnetic tapeD. None of the aboveQ6. System in which different part of a single program can run concurrently is:A. Real timeB. Multitasking21

22C. MultithreadingD. None of the aboveQ7. Whi

Operating System uses CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared computer. (4) Real Time Operating System : Real Time Operating System is a special purpose Operating System, used when there are rigid time requirements on the operation of a processor or the flow of data.

Related Documents:

Pass Google ADWORDS-FUNDAMENTALS Exam with 100% Guarantee Free Download Real Questions & Answers PDF and VCE file from: . A key benefit of My Client Center (MCC) is that it allows: . Latest Google exams,latest ADWORDS-FUNDAMENTALS dumps,ADWORDS-FUNDAMENTALS pdf,ADWORDS-FUNDAMENTALS vce,ADWORDS-FUNDAMENTALS dumps,ADWORDS-FUNDAMENTALS exam .

26 FUNDAMENTALS OF MILLING – CONVERSATIONAL PROGRAMMING HEIDENHAIN 2 CNC fundamentals 2NC fundamentals C 2.1atums D Workpiece datum, machine datum, reference point 2. CNC fundamentals Datums Explain t

FIRST Drive Systems 4/12/2007 Copioli & Patton page 1 Robot Drive System Fundamentals April 12th, 2007 . Robot Drive Systems 1. Drive System Requirements 2. Traction Fundamentals 3. FIRST Motors 4. Gearing Fundamentals 5. System Design Condition 6. Practical Considerations.

1.1 Operating System Functionality The operating system controls the machine It is common to draw the following picture to show the place of the operating system: application operating system hardware user This is a misleading picture, because applications mostly execute machine instruc-tions that do not go through the operating system.

An operating system is a control program. It controls the execution of user programs to prevent errors and improper use of the computer. The Primary goal of operating system is convenience for the user. The operating system makes the use of system easier. The secondary goal of operating system is efficient operation of the computer system.

Key words and phrases: operating system design, real time operating system, layered operating system, software architecture, and process communication. CR Categories: 3.80, 3.83, 4.35. i. INTRODUCTION The Modular Operating System for SUMC (MOSS) is a general purpose real time operating

An Operating System performs all the basic tasks like managing file, process, and memory. Thus operating system acts as manager of all the resources, i.e. resource manager. Thus operating system becomes an interface between user and machine. Types of Operating Systems: Some of the widely used operating systems are as follows- 1.

Asset Management is increasingly well understood by the business community as a strategic and business led discipline, where the value of assets is their contribution to achieving explicit business objectives. If you are encountering Asset Management for the first time, this book should be a helpful introduction to the key topics. It should also highlight the benefits which are there to be .