




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
this was very useful for bca students
Typology: Study notes
1 / 161
This page cannot be seen from the preview
Don't miss anything!
CHAPTER 1 INTRODUCTION TO OPERATING SYSTEMS
CHAPTER 2 FUNDAMENTAL OF OPERATING SYSTEM
CHAPTER 3 PROCESS MANAGEMENT
CHAPTER 4 THREAD MANAGEMENT
CHAPTER 5 CONCURRENCY CONTROL
CHAPTER 6 DEADLOCK
CHAPTER 7 MEMORY MANAGEMENT
CHAPTER 8 VIRTUAL MEMORY
CHAPTER 9 I/O HARDWARE
CHAPTER 10 I/O SOFTWARE
CHAPTER 11 SECONDARY STORADE MANAGEMENT
CHAPTER 12 FILE SYSTEMS
CHAPTER 13 PROTECTION
CHAPTER 14 SECURITY
CHAPTER 15 LINUX SYSTEM
After going through this unit, you will be able to: Describe Basic Organization of Computer Systems Define Operating system, functions, history and Evolution Define assembler, linker, loader, compiler
An operating system act as an intermediary between the user of a computer and computer hardware. The purpose of an operating system is to provide an environment in which a user can execute programs in a convenient and efficient manner.
An operating system is a software that manages the computer hardware. The hardware must provide appropriate mechanisms to ensure the correct operation of the computer system and to prevent user programs from interfering with the proper operation of the system.
1.2.1 Definition of Operating System:
An Operating system is a program that controls the execution of application programs and acts as an interface between the user of a computer and the computer hardware.
A more common definition is that the operating system is the one program running at all times on the computer (usually called the kernel), with all else being applications programs. An Operating system is concerned with the allocation of resources and services, such as memory, processors, devices and information. The Operating System correspondingly includes programs to manage these resources, such as a traffic controller, a scheduler, memory management module, I/O programs, and a file system.
1.2.2 Functions of Operating System Operating system performs three functions:
1. Convenience: An OS makes a computer more convenient to use. 2. Efficiency : An OS allows the computer system resources to be used in an efficient manner. 3. Ability to Evolve: An OS should be constructed in such a way as to permit the effective development, testing and introduction of new system functions without at the same time interfering with service.
1.2.3 Operating System as User Interface
Every general purpose computer consists of the hardware, operating system, system programs, application programs. The hardware consists of memory, CPU, ALU, I/O devices, peripheral device and storage device. System program consists of compilers, loaders, editors, OS etc. The application program consists of business program, database program. The fig. 1.1 shows the conceptual view of a computer system
on the disk, sending output to the display screen and controlling a peripheral devices.
OS is designed to serve two basic purposes :
The operating system must support the following tasks. The tasks are :
I/O System Management
The module that keeps track of the status of devices is called the I/O traffic controller. Each I/O device has a device handler that resides in a separate process associated with that device. The I/O subsystem consists of
Drivers for specific hardware devices.
Input to an assembler is an assembly language program. Output is an object program plus information that enables the loader to prepare the object program for execution. At one time, the computer programmer had at his disposal a basic machine that interpreted, through hardware, certain fundamental instructions. He would program this computer by writing a series of ones and zeros(machine language), place them into the memory of the machine.
The high level languages – examples are FORTRAN, COBOL, ALGOL and PL/I
An Operating system is concerned with the allocation of resources and services, such as memory, processors, devices and information. The Operating System correspondingly includes programs to manage these resources, such as a traffic controller, a scheduler, memory management module, I/O programs, and a file system.
Assembler Input to an assembler is an assembly language program. Output is an object program plus information that enables the loader to prepare the object program for execution.
Loader A loader is a routine that loads an object program and prepares it for execution. There are various loading schemes: absolute, relocating and direct- linking. In general, the loader must load, relocate, and link the object program
Compilers A compilers is a program that accepts a source program ‖-level in a high language ‖ and produces a corresponding objec
Q. 1 Define Operating System? Q. 2 Explain various function of operating system? Q. 3 Explain I/O system Management? Q. 4 Define & explain Assembler, Loader, Compiler?
CHAPTER 2 FUNDAMENTAL OF OPERATING SYSTEM
2.0 Objectives 2.1 Introduction 2.2 Operating System Services
2.3 Operating System Components 2.4 Batch System 2.5 Time Sharing System
2.6 Multiprogramming 2.7 Spooling 2.8 Properties of Operating System 2.9 Summary 2.10 Model Question
After going through this unit, you will be able to:
To describe the services an operating system provides to users, processes, and other systems Describe operating system services and its components. Define multitasking and multiprogramming. Describe timesharing, buffering & spooling.
An operating system provides the environment within which programs are executed. Internally, operating systems vary greatly in their makeup, since they are organized along many different lines. The design of a new operating system is a
A) Resource Allocation :
If there are more than one user or jobs running at the same time, then resources must be allocated to each of them. Operating system manages different types of resources require special allocation code, i.e. main memory, CPU cycles and file storage. There are some resources which require only general request and release code. For allocating CPU, CPU scheduling algorithms are used for better utilization of CPU. CPU scheduling algorithms are used for better utilization
of CPU. CPU scheduling routines consider the speed of the CPU, number of available registers and other required factors. B) Accounting : Logs of each user must be kept. It is also necessary to keep record of which user how much and what kinds of computer resources. This log is used for accounting purposes. The accounting data may be used for statistics or for the billing. It also used to improve system efficiency. C) Protection : Protection involves ensuring that all access to system resources is controlled. Security starts with each user having to authenticate to the system, usually by means of a password. External I/O devices must be also protected from invalid access attempts. In protection, all the access to the resources is controlled. In multiprocess environment, it is possible that, one process to interface with the other, or with the operating system, so protection is required.
Modern operating systems share the goal of supporting the system components. The system components are :
Scheduling is also simple in batch system. Jobs are processed in the order of submission i.e first come first served fashion. When job completed execution, its memory is releases and the output for the job gets copied into an output spool for later printing. Batch system often provides simple forms of file management. Access to file is serial. Batch systems do not require any time critical device management. Batch systems are inconvenient for users because users can not interact with their jobs to fix problems. There may also be long turn around times. Example of this system id generating monthly bank statement. Advantages o Batch System Move much of the work of the operator to the computer. Increased performance since it was possible for job to start as soon as the previous job finished.
Disadvantages of Batch System Turn around time can be large from user standpoint. Difficult to debug program. A job could enter an infinite loop. A job could corrupt the monitor, thus affecting pending jobs. Due to lack of protection scheme, one batch job can affect pending jobs.
Multi-programmed batched systems provide an environment where the various system resources (for example, CPU, memory, peripheral devices) are utilized effectively. Time sharing, or multitasking, is a logical extension of multiprogramming. Multiple jobs are executed by the CPU switching between them, but the
switches occur so frequently that the users may interact with each program while it is running. An interactive, or hands-on, computer system provides on-line communication between the user and the system. The user gives instructions to the operating system or to a program directly, and receives an immediate response. Usually, a keyboard is used to provide input, and a display screen (such as a cathode-ray tube (CRT) or monitor) is used to provide output.
If users are to be able to access both data and code conveniently, an on-line file system must be available. A file is a collection of related information defined by its creator. Batch systems are appropriate for executing large jobs that need little interaction. Time-sharing systems were developed to provide interactive use of a computer system at a reasonable cost. A time-shared operating system uses CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared computer. Each user has at least one separate program in memory. A program that is loaded into memory and is executing is commonly referred to as a process. When a process executes, it typically executes for only a short time before it either finishes or needs to perform I/O. I/O may be interactive; that is, output is to a display for the user and input is from a user keyboard. Since interactive I/O typically runs at people speeds, it may take a long time to completed.
A time-shared operating system allows the many users to share the computer simultaneously. Since each action or command in a time-shared system tends to be short, only a little CPU time is needed for each user. As the system switches rapidly from one user to the next, each user is given the impression that she has her own computer, whereas actually one computer is being shared among many users.
several programs in memory at the same time requires some form of memory management. Multiprogramming operating system monitors the state of all active programs and system resources. This ensures that the CPU is never idle unless there are no jobs. Advantages
Acronym for simultaneous peripheral operations on line. Spooling refers to putting jobs in a buffer, a special area in memory or on a disk where a device can access them when it is ready. Spooling is useful because device access data that different rates. The buffer provides a waiting station where data can rest while the slower device catches up. Fig 2.3 shows the spooling.
DISK
CARD PRINTER Fig 2.3 Spooling^ READER^ Process Computer can perform I/O in parallel with computation, it becomes possible to have the computer read a deck of cards to a tape, drum or disk and to write out to a tape printer while it was computing. This process is called spooling.
The most common spooling application is print spooling. In print spooling, documents are loaded into a buffer and then the printer pulls them off the buffer at its own rate. Spooling is also used for processing data at remote sites. The CPU sends the data via communications path to a remote printer. Spooling overlaps the I/O of one job with the computation of other jobs. One difficulty with simple batch systems is that the computer still needs to read the decks of cards before it can begin to execute the job. This means that the CPU is idle during these relatively slow operations. Spooling batch systems were the first and are the simplest of the multiprogramming systems.
Advantage of Spooling
1. Batch : Jobs with similar needs are batched together and run through the computer as a group by an operator or automatic job sequencer. Performance is increased by attempting to keep CPU and I/O devices busy at all times through buffering , off line operation, spooling and multiprogramming. A Batch system is good for executing large jobs that need little interaction, it can be submitted and picked up latter. 2. Time sharing : Uses CPU s scheduling and multiprogramming to provide economical interactive use of a system. The CPU switches rapidly from one user to another i.e. the CPU is shared between a number of interactive users. Instead of having a job defined by spooled card images, each program reads its next control instructions from the terminal and output is normally printed immediately on the screen. 3. Interactive : User is on line with computer system and interacts with it via an interface. It is typically composed of many short transactions where the result of the next transaction may be unpredictable. Response time needs to be short since the user submits and waits for the result.