Operating Systems

Operating Systems

Why Do We Need An Operating System:

    1. We saw in the last chapter that high-level languages were developed to enable computer users to concentrate on designing appropriate algorithms for solving problems instead of being concerned with the details of a computer’s internal structure. The compiler to translate the program is loaded in the memory. The source program is read and loaded in the memory.

Batch Operating System:

    1. When computers first designed they primarily had machine language and me/O using card readers or paper tape readers.Elementry I/O routines to ease a programmer’s task. Dumping the contents of memory on a line printer to facilitate detecting errors in programs. A control supervisor that facilitated passing controls between subroutines.

Multiprogramming operating System:

    1. In a batch OS, Jobs are executed sequentially one after another. If one job requires only half the available memory the other half is not utilized. Further, when a job require I/O the CPU will not be engaged. As I? O is slow processor time is wasted.

Process States:

    1. We make a clear distinction between a program and a process. A Program is a set of Instructions stored in the main memory as a static text and not yet invoked for execution. It is ready for execution but is waiting to be allocated to the CPU. This is called a READY state. It selected by the dispatcher of the OS and moved to CPU and starts executing. It is called the RUNNING state. It may require an I/O operation and thus cannot execute further. It is called a BLOCKED state.

Memory Management:

    1. In virtual memory is implemented by dividing programs into fixed-size pages and the main memory into page frames. To allow users to have the convenience of using a large addressable memory space without being concerned about physical main memory size limitations. To permit in a multiprogrammed system to share memory space efficiently among different users.

Process scheduling:

    1. An important responsibility of an OS is to select one program from the many programs waiting in the main memory to be executed and allot CPU time to it. All programs in the ready state are candidates to be scheduled to run on CPU.

Round Robin:

    1. In this, a quantum of time of the order of 100 msec is allocated to each ready program to run. When it exhausts its allocated time the next program in the queue is taken up.

Priority Scheduling:

    1. Each program may be given a priority weight. The programs are allocated to CPU based on their priority. A danger in this method is that a program with low priority may never be serviced.

Time-Sharing Operating System:

    It is a computer model is used in a batch mode a user submits his job along with a number of other users and all the jobs are put in a job queue and fed to the computer using this method the total number of jobs processed by the computer simultaneously.