Sei sulla pagina 1di 14

Multitasking/multiuser operating system concepts

We know about multitasking(multiuser)


1) Scheduling:
TSR programs and DOS refers to terminate and stay
resident program
TSR is a computer program that uses a system call in DOS operating
System to return control of the computer to the operating system, as though
the program has quit, but stays resident in computer memory so it can be
reactivated by a hardware or software interrupt.
Meaning:
we all have used DOS and you should know that there was a major
limitation in DOS , that it can execute only one task or program at a time.
So TSR technique partially overcomes that disadvantage.
TSR" implies, stay resident in memory while other programs are executing
NOW why partially??? not applicable to all programs
Using TSR:
IN DOS, only one program can execute at a time. When you close that
program, it gives control back to the DOS shell program, using the system
call. The memory and system resources that were used by the program are
then marked as unused. Now if you want to restart some parts of that
program u need to start that program again form the scratch.
Now what TSR does: Before making this call, the program can install one
or several interrupt handlers pointing into itself, so that it can be called
again. Now the address of interrupt vector is stored within the memory space
of the TSR. The stored address is called when the TSR receive an interrupt.
FAULTS in TSR: TSR programs had a reputation as troublemakers. The
"terminate and stay resident" method was used by most DOS viruses which
could either take control of the PC or stay in the background. Viruses would
react to disk I/O or execution events by infecting executable (.EXE or
.COM) files when they were run and data files when they were opened.
There is one more major fault.
In DOS every program (even the one with large RAM) has to be loaded in
the first 640kb of RAM. So, TSRs were no exception. This meant that
writing a TSR was a challenge of achieving the smallest possible size for it,

and checking it for compatibility with a lot of software products from


different vendorsoften a very frustrating task.
CONCLUSION: Short for Terminate-and-stay-resident, a TSR is a software
program that remains in memory until it is needed, and then performs some
function. A good example of a TSR is a Virus Scanner, which must remain loaded
in memory to help protect your computer from computer viruses.
Time Slice Scheduling: hrek process ko time de denge
thoda thoda(about 20ms).ek baar saare execute hone kai
baad dobara sai first process.
In multiuser OS, the part of the OS which determines when
it is time to switch from one task to another is called the
Scheduler, dispatcher or supervisor.
PREEMPTIVE priority based SCHEDULING:
An executing low priority task can be interrupted by a
higher-priority task.
2) Preserving the Environment:
The registers, data, pointers etc. used by an executing task are
referred to its environment, state or context.
When a task switch occurs, the environment of the interrupted task must be
saved so that task can be restarted properly when it receives another time
slice. In multiuser, every task is assigned some time slice again and again.
So, the task is kept in a special memory or on a stack. When a task switch
occurs the OS saves the environment of the interrupted task and allocates a
pointer to the saved environment. When we need to switch back to task, OS
uses the pointer to access the task. Tis Process is called Context Switching.
3) Accessing Resources:
In multitasking, we need to assure that task have orderly
access to resources such as printers, disk drivers etc.
Suppose you are reading a file on server and want to take
a printout. Now there are also other users that may be
reading that file. Now every user has a time slice of
20ms.
Now you cannot do your task (reading and printing) in
20ms. So you need a number of time slices.

A flag or semaphore in memory is used to indicate


whether the printer is in use. If a task cannot access a
resource because It is busy, then task is said to be
blocked.
4) NEED of Protection:
In multiuser problem occur , when teo or more users attempts to
read and change the contents of amemory locations at the same
time. Take any example and explain kr dena.
Nhi aaya samaj mai to 4th sem ka operating system
mai process synchronization mai LOCK and key vala
concept than a vo explain krna hai.
But book mai thoda sa different method hai
Page 15.5 read kr lena ek baar
5) Memory management (virtual memory etc.)sabko pta hai..ek baar book maid
dk lena
80186,80286,80386,80486 and Pentium processor
So before starting we must know something about 8086. Intel 8086 is a 16 bit
microprocessor intended to be used as a CPU in a microcomputer. The term 16 bit
means that its arithmetic logic unit, its internal registers, its instructions are
designed to work with 16 bit binary words. It has a 20 bit address bus and 16 bit
data bus. So this means that it can address any one of the 1048576 memory
locations and it can read data from or write data to the memory and ports either 16
bit or 8 bit at a time. Here the word is stored in two consecutive memory locations.
Also one thing to note here is that if the first byte of the word is stored at even
address, the 8086 can read the entire word in one operation. Alternatively if the
first byte of the word is at odd address, then the 8086 will read the first byte in one
operation and the second byte in the second operation. 8088 is just similar to 8086
but the difference between the two is that 8088 has a 8 bit data bus.
80186: The Intel 80186 is an improved version of 8086. It is also a 16 bit
microprocessor but it has a programmable peripheral devices integrated in the
same package. 80186 instruction set has all the instructions of 8086 but also has
certain additional instructions. A program written in 8086 will execute properly on
80186 but the vice- versa is not true.

Jo jo 8086 mai pda hai na(architecture,memory,vagra vagra) sab kuch emai lihkna
hai..same hote hain.
80286: first member in its family designed specifically for use as the cpu in a
multiuser microcomputer.
The Intel 80286 (often called simply the 286) was a 16-bit microprocessor chip
introduced in 1982. It quickly became popular in PCs (personal computers) and
could be found in many machines into the 1990s.
Why does it become so popular??
Well it was multiuser. It also have memory management, it also offered more than
twice as much performance per clock cycle as the 8086 or 8088.
The 80286 chip contained a 24-bit address bus, capable of accessing up to 16 MB
(megabytes) of RAM (random access memory). The CPU (central processing unit)
supported multitasking, allowing a user to work with more than one application at
a time. In multitasking, the OS (operating system) can keep track of where you are
in various applications and go from one to the other without losing information.
The 80286 could also take advantage of protected mode, which helped to prevent
applications from writing outside their allocated RAM zones
Features of 8086:
80286 is the first member of the family of advanced
microprocessors with memory management and
protection abilities
The 80286 CPU, with its 24-bit address bus is able to
address 16Mb of physical memory
Available in 12.5Mhz, 10MHz & 8Mhz clock frequencies
Memory management , virtual memory management &
protection abilities
Memory management is supported by a hardware unit
called Memory management unit.
Intels 80286 is the first CPU to incorporate the
integrated memory management unit.
Function of memory management unit : Ensure smooth
execution of the program and Protection

Important aspect of memory management is Data


Protection or unauthorized access prevention.
o Done with the help of segmented memory
o Prevents overlapping of segments to avoid
random result.

Operating Modes of 80286


Intel 80286 has 2 operating modes.
1. Real address mode.
1. 80286 just as a fast 8086
2. All memory management and protection
mechanisms are disabled
3. 80286 can address up to 1Mb of physical
memory address like 8086
4. In real address mode, the 80286 is object code
compatible with 8086
2. Protected Virtual address mode
1. it can address up to 16 Mb of physical memory
address space and 1 Gb of virtual memory address
space
2. In protected virtual address mode, it is source code
compatible with 8086
3. 80286 works with all of its memory management
and protection capabilities with the advanced
instruction set.
Register organization of 80286
The 80286 CPU contains almost the same set of
registers, as in 8086.
1. Eight 16-bit general purpose registers.
2. Four 16 bit segment registers.

3. Status and control register.


4. Instruction pointer.

FLAG RESITERS OF 80286

Internal Block Diagram of 80286

80386 :
COMPARISON OF 80286 and 80386
80286
80386
Intel 80286 was developed in 1983 and Intel 80386 was developed in 1985 and it

it is advanced version of 80186


16 bit processor
134K transistor in a 68 pin IC
24 bit address lines , 16 MB of
physical memory can be accessed
80286 support numeric processors
8 byte prefetch queue

80486:

is advanced version of 80286


32 bit processor
275K transistor in 132 pin IC
32 bit data and 32 bit address lines ,
4GB of physical address it can support
Supports numeric processors
It is having 16 byte prefetch queue

Study the another attached file.

Potrebbero piacerti anche