Introduction To OS and Process Management
Introduction To OS and Process Management
INTRODUCTION:
Operating System:
➢ A program that acts as an intermediary between a user of a computer and the computer hardware.
➢ Operating system goals
• Execute user programs and make solving user problems easier.
• Make the computer system convenient to use.
➢ Use the computer hardware in an efficient manner.
Fig: Spooling
Spooling overlaps the I/O of one job with the computation of other jobs. Even in a simple system,
the spooler may be reading the input of one job while printing the output of a different job. During this
time, still another job (or jobs) may be executed, reading their "cards" from disk and "printing" their
output lines onto the disk. Spooling has a direct beneficial effect on the performance of the system.
Multi Programmed Systems
➢ Spooling provides an important data structure: a job pool. Spooling will generally result in several
jobs that have already been read waiting on disk, ready to run. A pool of jobs on disk allows the
operating system to select which job to run next, to increase CPU utilization.
➢ A single user cannot, in general, keep either the CPU or the I/O devices busy at all times.
Multiprogramming increases CPU utilization by organizing jobs such that the CPU always has one to
execute.
➢ The operating system keeps several jobs in memory at a time as shown in the following figure.
Operating
System
Job1
Job2
Job3
Job4
Process Concepts
➢ An operating system executes a variety of programs:
• Batch system – jobs
• Time-shared systems – user programs or tasks
➢ The terms job and process can be used almost interchangeably
➢ Process: a program in execution; process execution must progress in sequential fashion.
➢ A process is more than the program code, which is sometimes known as the text section.
➢ It also includes the current activity, as represented by the value of the program counter and the
contents of the processor's registers.
➢ A process generally also includes the process stack, which contains temporary data (such as function
parameters, return addresses, and local variables), and a data section, which contains global variables.
➢ A process may also include a heap, which is memory that is dynamically allocated during process run
time. The structure of a process in memory is shown in figure.