Friday, January 18, 2019

Operating System

Operating System

1)NO Memory Abstraction

          The simplest memory abstraction is no abstraction at all. Early maniframe computers(before 1960),Early minicomputers(before 1970), and early personal computers(before 1980) had no memory abstraction.Every program simplybsaw the physical memory. When a program executed an instruction like

MOV REGISTER1,1000

the computer just moved the content of physical memory location of 1000 to the REGISTER1. Thus the model of memory presented t o the programmer was simply physical memory, a set of address from 0 to some maximum, each addresss corresponding to a cell containing some number of bits, commonly eight.

          Under these conditions, it was not possible to have two running programs in memory at the same time. If the first program wrote a new value to, say, location 2000, this would erase whatever value the second program was storing there . Nothing woukd work and both programs would crash almost immediately.

          Even with model of memory being just physical memory, several options are possible.
The operating system may be at the bottom of memory in RAM(Random Access Memory), as shown in diagram or it my be in a ROM(Read Only Memory) at the top of memory, or the device drivers may be at the top of memory in a ROM and the rest at the system of RAM down below. The first model was formerly used on mainframes and minicomputers but is rarely used any more. The second  model is used on some handheld computers and embedded systems. The third model was used by early personal computers(eg: runningMS-DOS), where the portion of the system in the ROM is called BIOS(Basic Input output System). Models have the disadvantage that a bug in the user program can wipe out the operating system, possibly with disastrous results(such as garbling the disk).

          When the system is organised in this way, generally only, one process at a time can be running. As soon as the user types a command, the operating system copies the requested program from the disk to memory and executes it. When the process finishes, the operating system displays the prompt character and waits for a new command. When it receives the command, it loads a new program into memory, overwriting the first one.

          One way to get some parallel in a system with no memory abstraction is to program with multiple threads. Since all the threads in a process are supposed to see te same memory image, the fact that they are forced to is not a problem. While this idea works,it is of limited use since what people often want is unrelated program to be running at the same time, something he threads abstraction does not provide. Furthermore, any system that is so primitive as to provide a threads abstraction.          


No comments:

Post a Comment