vikantgajjar
New member
Batch Processing Systems:
When punch cards were used to record user jobs processing of a jab involved physical actions by the system operator e.g. loading a deck of cards into the card reader pressing switches on the computer’s console to initiate the job. These actions wasted a lot of CPU time. Bp was introduced to avoid this wastage.
A batch is a sequence of user jobs. A computer operator forms a batch by arranging user jobs in a sequence and inserting special marker cards to indicate the start and end of the batch. After forming a batch the operator submits it to the batch processing operating system. The primary function of the BP system is to implement the processing of the jobs in a batch.
Batch processing is implemented by locating a component of the BP system called the batch monitor or supervisor permanently in one part of the computer’s memory. The remaining memory is used to process a user job the current job in the batch. The batch monitor is responsible for implementing the various function of the batch processing system. It accepts a command from the system operator for initiating the processing of a batch and sets up the processing of the first job of the batch. At the end of the job it performs job termination processing and initiates execution of the batch; it performs batch termination processing system and awaits initiation of the next batch by the operator.
The part of memory occupied by the batch monitor is called the system area
And the part occupied by the user job is called the user area.
User Service:
User evaluates the performance of an os on the basis of the service accorded to his or her job. The notion of turn-around time is used to quantity user service in a batch processing system.
Batch processing does not guarantee improvements in the turn around time of jobs. Batch processing does not aim at improving user services-it aims at improving CPU utilization.
Batch Monitor Function:
The basic task of the batch monitor is to exercise effective control Over the BP environment. This task can be classified into the following three functions.
Scheduling
Memory Management
Sharing and Protection
The batch monitor performs two functions before initiating the execution of a job. The third function is performed during the execution of a job.
In batch processing system the CPU of the computer system is the server and the user jobs are the service requests. The nature of batch processing dictates the use of the First Come First Serve (FCFS) scheduling. The batch monitor performs scheduling by always selecting the next job in the batch for execution. Scheduling does not influence the user services in the BP system because the turn around time of each job in a batch is subject to some other factors.
At any time during a BP system’s operation the memory is divided into the system area and the user area. The user area of the memory is sequentially shared by the jobs in the batch.
Multiprogramming System:
Early computer systems implement IO operation as CPU instructions. It sent a signal to the card reader to read a card and waited for the operation to complete before initiating the next operation. However the speeds of operation of IO device were much lower than the speed of the CPU. Programs took long to complete their execution. A new feature was introduced in the machine architecture when this weakness was realized. This feature permitted the CPU to delink itself from an IO operation so that it could execute instructions while an IO operation was in progress. Thus the CPU and the IO device could now operate concurrently.
If many user programs exits in the memory the CPU can execute instruction of one program while the IO subsystem is busy with an IO operation for another program. The term multiprogramming is used to describe this arrangement. At any moment the program corresponding to the current job step of each job is in execution. The IO device and memory are allocated using the partitioned resource allocation approach. At any time the CPU and IO subsystem are busy with programs belonging to different jobs. Thus they access different areas of memory. In principle the CPU and IO subsystem could operate on the same program. Each job in the memory could be current job of a batch of jobs. Thus one could have both batch processing and multiprogramming supervisor. Analogous to a BP supervisor the MP supervisor also consists of a permanently residents part and a transient part.
The multiprogramming arrangement ensures concurrent operation of the CPU and the IO subsystem without requiring a program a program to use the special buffering techniques. It simply ensures that the CPU is allocated to a program only when it is not performing an IO operation.
Memory Management:
The memory of computer system consist of primary memory the secondary memories like disks and tapes and buffer or cache memories. Of these management of a secondary memory is under the control of the file system. Cache memories are captive to the hardware subsystems and are not accessible to a user program. Hence the term memory management is used for the management of the primary memory.
Memory management includes the memory allocation efficient utilization of memory and protection of memory allocated to a program or a process from interference by other programs.
Two kind of memory management are performed during the operations of an OS. These involves allocation and deallocation of memory
To program or processes
Within a program or process
Allocation of memory is done by the kernel.
Virtual Memory
A computer system is said to use virtual memory (VM) if a memory address use by an instruction is likely to be different from the effective address of the memory location accessed during its execution. In other words, a virtual memory system one that makes noncontiguous memory allocation feasible. The memory handler in a VM system is called the VM handler.
While loading a program for execution it is viewed as a sequential arrangement of abstract part called program components. Each component is allocated a single contiguous are of memory. However areas allocated to different components can be noncontiguous with one another. An address used in an instruction of a programs say an operand address is considered to consist of two parts-the id of the program component containing the address and the id of the word within the component. Each address is represented by the pair (comp, wordi). In an address (10, 349), compi = 10 an wordi =349. It is thus the address of the 349’h word in the program component
Address translation
Let us see the basics of address translation with the help of an address (10,349)
Consider program component 10 to be allocated the memory area starting at adder;
27000. Then,
Effective memory address corresponding to the address (10, 349)
= (Start address of component 10) + 349
= 27000 + 349 = 27349 (15.
Address translation can be performed in a table-based manner where the table contains start addresses of various components of a program. In an address (compj, word
, comp; is used to index this table to obtain its start address in memory.
Process Scheduling
Process scheduling consists of the following sub-functions:
Scheduling: Selects the process to be executed next on the CPU
Dispatching: Sets up execution of the selected process on the CPU
Context Save: Saves the status of a running process when its execution is to be suspended
The Scheduling function uses information form the PCB’s and selects a process based on the scheduling policy. Dispatching involves setting up the execution environment of the selected process and loading information from the PSR and registers field of the PCB into the CPU. The context save function performs housekeeping whenever a process releases the CPU. It involves saving the PSR and registers in the appropriate fields of PCB and changing process state.
Event
Context Save
Scheduling
Dispatching
Occurrence of an event invokes the context save function The kernel now processes the event which has occurred. This processing may lead to change of state for some process. The scheduling function is now invoked to select a process for execution on the CPU. The dispatching function arranges execution of the selected function on the CPU.
Process Termination:
When a process terminates the kernel has to release all resources allocated to that process.
If the termination process was created by another user process some additional actions are necessary to implement process synchronization.
Directory structure
A directory contains the information about files. Thus it is the central to the function of FS. To implement the mapping function, FS use a separate directory called user directory (UD), for files owned by each user. Assume that we have two user for the user A and B. when a program executed by user A performance the open call.
Open (Virani…)
FS searches for the files Virani in the UD of user A. if the statement was executed by some program executed by B; FS would have searched B’s UD for Virani. This arrangement ensures that the correct files would be accessed even if many files with identical names exist in the same system. FS uses the master directory to store the information concerning different UDs.
Syntax may be provided to another user’s file. For example a program executed by user C may perform the open call to open A’s directory.
FS can implement this using A’s directory, rather than C’s directory, to search and locate the file Virani. The directory entry of file should now contain the necessary of such an open call.
File name location info protection info flags
When punch cards were used to record user jobs processing of a jab involved physical actions by the system operator e.g. loading a deck of cards into the card reader pressing switches on the computer’s console to initiate the job. These actions wasted a lot of CPU time. Bp was introduced to avoid this wastage.
A batch is a sequence of user jobs. A computer operator forms a batch by arranging user jobs in a sequence and inserting special marker cards to indicate the start and end of the batch. After forming a batch the operator submits it to the batch processing operating system. The primary function of the BP system is to implement the processing of the jobs in a batch.
Batch processing is implemented by locating a component of the BP system called the batch monitor or supervisor permanently in one part of the computer’s memory. The remaining memory is used to process a user job the current job in the batch. The batch monitor is responsible for implementing the various function of the batch processing system. It accepts a command from the system operator for initiating the processing of a batch and sets up the processing of the first job of the batch. At the end of the job it performs job termination processing and initiates execution of the batch; it performs batch termination processing system and awaits initiation of the next batch by the operator.
The part of memory occupied by the batch monitor is called the system area
And the part occupied by the user job is called the user area.
User Service:
User evaluates the performance of an os on the basis of the service accorded to his or her job. The notion of turn-around time is used to quantity user service in a batch processing system.
Batch processing does not guarantee improvements in the turn around time of jobs. Batch processing does not aim at improving user services-it aims at improving CPU utilization.
Batch Monitor Function:
The basic task of the batch monitor is to exercise effective control Over the BP environment. This task can be classified into the following three functions.
Scheduling
Memory Management
Sharing and Protection
The batch monitor performs two functions before initiating the execution of a job. The third function is performed during the execution of a job.
In batch processing system the CPU of the computer system is the server and the user jobs are the service requests. The nature of batch processing dictates the use of the First Come First Serve (FCFS) scheduling. The batch monitor performs scheduling by always selecting the next job in the batch for execution. Scheduling does not influence the user services in the BP system because the turn around time of each job in a batch is subject to some other factors.
At any time during a BP system’s operation the memory is divided into the system area and the user area. The user area of the memory is sequentially shared by the jobs in the batch.
Multiprogramming System:
Early computer systems implement IO operation as CPU instructions. It sent a signal to the card reader to read a card and waited for the operation to complete before initiating the next operation. However the speeds of operation of IO device were much lower than the speed of the CPU. Programs took long to complete their execution. A new feature was introduced in the machine architecture when this weakness was realized. This feature permitted the CPU to delink itself from an IO operation so that it could execute instructions while an IO operation was in progress. Thus the CPU and the IO device could now operate concurrently.
If many user programs exits in the memory the CPU can execute instruction of one program while the IO subsystem is busy with an IO operation for another program. The term multiprogramming is used to describe this arrangement. At any moment the program corresponding to the current job step of each job is in execution. The IO device and memory are allocated using the partitioned resource allocation approach. At any time the CPU and IO subsystem are busy with programs belonging to different jobs. Thus they access different areas of memory. In principle the CPU and IO subsystem could operate on the same program. Each job in the memory could be current job of a batch of jobs. Thus one could have both batch processing and multiprogramming supervisor. Analogous to a BP supervisor the MP supervisor also consists of a permanently residents part and a transient part.
The multiprogramming arrangement ensures concurrent operation of the CPU and the IO subsystem without requiring a program a program to use the special buffering techniques. It simply ensures that the CPU is allocated to a program only when it is not performing an IO operation.
Memory Management:
The memory of computer system consist of primary memory the secondary memories like disks and tapes and buffer or cache memories. Of these management of a secondary memory is under the control of the file system. Cache memories are captive to the hardware subsystems and are not accessible to a user program. Hence the term memory management is used for the management of the primary memory.
Memory management includes the memory allocation efficient utilization of memory and protection of memory allocated to a program or a process from interference by other programs.
Two kind of memory management are performed during the operations of an OS. These involves allocation and deallocation of memory
To program or processes
Within a program or process
Allocation of memory is done by the kernel.
Virtual Memory
A computer system is said to use virtual memory (VM) if a memory address use by an instruction is likely to be different from the effective address of the memory location accessed during its execution. In other words, a virtual memory system one that makes noncontiguous memory allocation feasible. The memory handler in a VM system is called the VM handler.
While loading a program for execution it is viewed as a sequential arrangement of abstract part called program components. Each component is allocated a single contiguous are of memory. However areas allocated to different components can be noncontiguous with one another. An address used in an instruction of a programs say an operand address is considered to consist of two parts-the id of the program component containing the address and the id of the word within the component. Each address is represented by the pair (comp, wordi). In an address (10, 349), compi = 10 an wordi =349. It is thus the address of the 349’h word in the program component
Address translation
Let us see the basics of address translation with the help of an address (10,349)
Consider program component 10 to be allocated the memory area starting at adder;
27000. Then,
Effective memory address corresponding to the address (10, 349)
= (Start address of component 10) + 349
= 27000 + 349 = 27349 (15.
Address translation can be performed in a table-based manner where the table contains start addresses of various components of a program. In an address (compj, word

Process Scheduling
Process scheduling consists of the following sub-functions:
Scheduling: Selects the process to be executed next on the CPU
Dispatching: Sets up execution of the selected process on the CPU
Context Save: Saves the status of a running process when its execution is to be suspended
The Scheduling function uses information form the PCB’s and selects a process based on the scheduling policy. Dispatching involves setting up the execution environment of the selected process and loading information from the PSR and registers field of the PCB into the CPU. The context save function performs housekeeping whenever a process releases the CPU. It involves saving the PSR and registers in the appropriate fields of PCB and changing process state.
Event
Context Save
Scheduling
Dispatching
Occurrence of an event invokes the context save function The kernel now processes the event which has occurred. This processing may lead to change of state for some process. The scheduling function is now invoked to select a process for execution on the CPU. The dispatching function arranges execution of the selected function on the CPU.
Process Termination:
When a process terminates the kernel has to release all resources allocated to that process.
If the termination process was created by another user process some additional actions are necessary to implement process synchronization.
Directory structure
A directory contains the information about files. Thus it is the central to the function of FS. To implement the mapping function, FS use a separate directory called user directory (UD), for files owned by each user. Assume that we have two user for the user A and B. when a program executed by user A performance the open call.
Open (Virani…)
FS searches for the files Virani in the UD of user A. if the statement was executed by some program executed by B; FS would have searched B’s UD for Virani. This arrangement ensures that the correct files would be accessed even if many files with identical names exist in the same system. FS uses the master directory to store the information concerning different UDs.
Syntax may be provided to another user’s file. For example a program executed by user C may perform the open call to open A’s directory.
FS can implement this using A’s directory, rather than C’s directory, to search and locate the file Virani. The directory entry of file should now contain the necessary of such an open call.
File name location info protection info flags