Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

operation research chapters, Study notes of Operational Research

this was very useful for bca students

Typology: Study notes

2020/2021

Uploaded on 07/04/2021

pavan-patil7517
pavan-patil7517 🇮🇳

1 document

1 / 161

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Operating Systems
BCA305T
New Horizon College- Marathalli, Bangalore - 560103 Page 1
SUBJECT: OPERATING SYSTEMS
SUBJECT CODE: BCA305T
SEMESTER: III SEMESTER
COURSE: BCA
SUBJECT TEACHER: Mr.H.Rajesh
Senior Assistant Professor,
Department of Computer Science BCA
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download operation research chapters and more Study notes Operational Research in PDF only on Docsity!

SUBJECT: OPERATING SYSTEMS

SUBJECT CODE: BCA305T

SEMESTER: III SEMESTER

COURSE: BCA

SUBJECT TEACHER: Mr.H.Rajesh

Senior Assistant Professor,

Department of Computer Science – BCA

Operating System

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

1.0 Objectives

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

1.1 Introduction

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 Operating 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 :

  1. It controls the allocation and use of the computing system‘s resources among the various user and tasks.
  2. It provides an interface between the computer hardware and the programmer that simplifies and makes feasible for coding, creation, debugging of application programs.

The operating system must support the following tasks. The tasks are :

  1. Provides the facilities to create, modification of program and data files using and editor.
  2. Access to the compiler for translating the user program from high level language to machine language.
  3. Provide a loader program to move the compiled program code to the computer‘s memory for execution.
  4. Provide routines that handle the details of I/O programming.

1.3 I/O System Management

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

  1. A memory management component that includes buffering, caching and spooling.
  2. A general device driver interface.

Drivers for specific hardware devices.

1.4 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. 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.

1.5 Compiler

The high level languages – examples are FORTRAN, COBOL, ALGOL and PL/I

  • are processed by compilers and interpreters. A compilers is a program that accepts a source program in a ―high-level language ‖ and pr corresponding object program. An interpreter is a program that appears to execute a source program as if it was machine language. The same name (FORTRAN, COBOL etc) is often used to designate both a compiler and its associated language.

1.6 Loader

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

1.9 Model Question

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

Unit Structure

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

2.0 Objectives

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.

2.1 Introduction

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

  1. File system manipulation : Program needs to read a file or write a file. The operating system gives the permission to the program for operation on file.
  2. Communication : Data transfer between two processes is required for some time. The both processes are on the one computer or on different computer but connected through computer network. Communication may be implemented by two methods: a. Shared memory b. Message passing.
  3. Error detection : error may occur in CPU, in I/O devices or in the memory hardware. The operating system constantly needs to be aware of possible errors. It should take the appropriate action to ensure correct and consistent computing. Operating system with multiple users provides following services.
  4. Resource Allocation
  5. Accounting
  6. Protection

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.

2.3 Operating System Components

Modern operating systems share the goal of supporting the system components. The system components are :

  1. Process Management
  2. Main Memory Management
  3. File Management
  4. Secondary Storage Management
  5. I/O System Management
  6. Networking

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.

2.5 Time Sharing Systems

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

  1. High CPU utilization.
  2. It appears that many programs are allotted CPU almost simultaneously. Disadvantages
  3. CPU scheduling is requires.
  4. To accommodate many jobs in memory, memory management is required.

2.7 Spooling

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. The spooling operation uses a disk as a very large buffer.
  2. Spooling is however capable of overlapping I/O operation for one job with processor operations for another job.

2.8 Essential Properties of the Operating System

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.