diff b/w FAT 16 and FAT 32 pg299
Now lets move our discussion to FAT32. In theory the major
difference between FAT 16 and FAT 32 is of course the FAT size. FAT32 evidently
will contain more entries and can hence manage a very large disk whereas FAT16
can manage a space of 2 GB maximum practically.
Or
In
the FAT32 there is a special reserved block called FSInfo sector. The block
contains some information required by the operating system while cluster
allocation/deallocation to files. In FAT12 and 16 this information is
calculated when ever required. This calculation at the time of allocation is
not feasible in FAT32 as the size of FAT32 is very large and such calculations
will consume lots of time, so to save time this information is stored in the
FSInfo block and is updated at the time of allocation/deallocation.
can FAT 12 access 1GB drive?
No
1. diff b/w s/w interrupt & H/W intrupt?
Software
interrupts are invoked by means of some software instruction or statement and
hardware interrupt is invoked by means of some hardware controller generally.
The only difference between them is the method by which they are invoked
2. Define defragmentation?
Fragmentation
means that clusters of a same file are not contiguously placed, rather they are
far apart, increasing seek time hence access time.
• So its desirable that files clusters may be placed contiguously, this can be done by compaction or defragmentation.
• So its desirable that files clusters may be placed contiguously, this can be done by compaction or defragmentation.
Defragmentation
Software reserves space for each file in contiguous block by moving the data in
clusters and
re a d j us t i ng .
• As a result of defragmentation the FAT entries will change and data will move from one cluster to other localized cluster to reduce seek time.
• Defragmentation has high computation cost and thus cannot be performed frequently.
re a d j us t i ng .
• As a result of defragmentation the FAT entries will change and data will move from one cluster to other localized cluster to reduce seek time.
• Defragmentation has high computation cost and thus cannot be performed frequently.
3. State of viruses, 3 name only?
•
Dormant State:
A
Virus in dormant state has embedded itself within and is observing system
activities.
• Activation State:
A
Virus when activated would typically perform some unwanted tasks causing data
loss. This state may triggered as result of some event.
• Infection State:
A
Virus is triggered into this state typically as a result of some disk
operation. In this state, the Virus will infect some media or file in order to
propagate itself.
4. Find the sector# of 1CH
No of sector/block is 8
first block is 20
1. How large file contain can be managed using FAT?
Larger
File Contents
• Larger files would be comprised of numerous clusters.
• The first Cluster # can be read from FCB for rest of the Cluster, a chain is maintained within the FAT.
• Larger files would be comprised of numerous clusters.
• The first Cluster # can be read from FCB for rest of the Cluster, a chain is maintained within the FAT.
2. What do you mean by mirroring in FAT32?
On
all FAT drives, there may be multiple copies of the FAT. If an error occurs
reading the primary copy, the file system will attempt to read from the backup
copies. On FAT16 and FAT12 drives, the first FAT is always the primary copy and
a modification will automatically be written to all copies. However, on FAT32
drives, FAT mirroring can be disabled, and a FAT other than the first one can be
the primary (or "active") copy of the FAT.
3. Enlist all the activities that are to be performed when
interrupt 9 occurs?
The
service 15H/4FH is called the keyboard hook service. This service does not
perform any useful output, it is there to be intercepted by applications which
need to alter the keyboard layout. It called by interrupt 9H after it has
acquired the scan code of input character from the keyboard port while the scan
code is in AL
register. When this service returns interrupt 9H translates the scan code into
ASCII code and places it in buffer. This service normally does nothing and
returns as it is but a programmer can intercept it in order to change the scan
code in AL
and hence altering the input or keyboard layout.
Answer
is reads scan code then converts to ASCII and Place it in keyboard buffer and
return these are the activities performed when interupt 9 occurs.
4. Difference between COM File and DOS Exe Files?
The
main difference in COM File and DOS EXE File is that the COM File starts its
execution from the first instruction, whereas the entry point of execution in
EXE File can be anywhere in the Program.
• The entry point in case of EXE File is tempered by the Virus which is stored in a 27-byte header in EXE File.
• The entry point in case of EXE File is tempered by the Virus which is stored in a 27-byte header in EXE File.
5. Write a Formula to transfer the cluster # in LSN for FAT32 file
System.
In
reflection of the anatomy of FAT32 based system the method used to translate
the
cluster # into LSN also varies. The following formula is used for this purpose.
Starting Sector # for a Cluster
Starting Sector = Reserved Sect. + FatSize *
FatCopies + (cluster # - 2) *
size of cluster page no ....293
cluster # into LSN also varies. The following formula is used for this purpose.
Starting Sector # for a Cluster
Starting Sector = Reserved Sect. + FatSize *
FatCopies + (cluster # - 2) *
size of cluster page no ....293
7. How many maximum possible entries are there in FAT32 and FAT16?
In
FAT16 we can have 2^16=65536 entries.
FAT32
evidently will contain more entries and can hence manage a very large disk
whereas FAT16 can manage a space of 2 GB maximum practically.
8. Cross reference of Cluster can be Detected?
•
If a cluster lie in more than one file chain, then its said to be Cross
Referenced.
• Cross references can be detected easily
by traversing through the chain of all files
and marking the cluster # during traversal.
• If a cluster is referenced more than once then it indicates a cross reference.
• Cross references can be detected easily
by traversing through the chain of all files
and marking the cluster # during traversal.
• If a cluster is referenced more than once then it indicates a cross reference.
•
To solve the problem only one reference should be maintained.
9. Write down the Structure of boot Block.
Inside
a Boot Block
•
Contains Code and Data
jmp
codepart
OSName
BIOS
Parameter
Block
codepart:
•
Boot Block executes at Booting time.
Pg244
10 How portion table virus fools dos about conventional memory?
•
The transient part of Command.Com loads itself such that its last byte is
loaded in the last byte of Conventional Memory. If somehow there is some Memory
beyond Command.Com’s transient part it will not be accessible by DOS.
•
At 40:13H a word contains the amount of KBs in Conventional Memory which is
typically 640.
• If the value at 40:13H is somehow reduced to 638 the transient part of Command.Com will load itself such that its last byte is loaded at the last byte of 638KB mark in Conventional RAM.
• In this way last 2KB will be left unused by DOS. This amount of memory is used by the Virus according to its own size.
• If the value at 40:13H is somehow reduced to 638 the transient part of Command.Com will load itself such that its last byte is loaded at the last byte of 638KB mark in Conventional RAM.
• In this way last 2KB will be left unused by DOS. This amount of memory is used by the Virus according to its own size.
11. Anatomy of FAT32?
No
fixed space reserved for root directory.
• FCB of root directory is saved in a cluster and the cluster # for root directory is saved in BPB.
• FCB of root directory is saved in a cluster and the cluster # for root directory is saved in BPB.
12. TSR program that sets the caps lock bit in the keyboard status
bytes whenever interrupt
8 occurs.
Another
Example
#include
<dos.h>
void
interrupt (*old)();
void
interrupt new();
char
far *scr=(char far* ) 0x00400017;
void
main() {
old=getvect(0x08);
setvect(0x08,new);
keep(0,1000);
}
void
interrupt new (){
*scr=64;
(*old)();
}
2. Can we send the data to keyboard yes or not?
Keyboard is a typically an input device but some data can also be send to the keyboard device. This data is used as some control information by the keyboard. One such information is the typematic rate.
3. Write a Formula to transfer the cluster # in LSN for FAT32 file System.
In
reflection of the anatomy of FAT32 based system the method used to translate
the
cluster # into LSN also varies. The following formula is used for this purpose.
Starting Sector # for a Cluster
Starting Sector = Reserved Sect. + FatSize *
FatCopies + (cluster # - 2) *
size of cluster page no ....293
cluster # into LSN also varies. The following formula is used for this purpose.
Starting Sector # for a Cluster
Starting Sector = Reserved Sect. + FatSize *
FatCopies + (cluster # - 2) *
size of cluster page no ....293
Comments
Post a Comment
Please give us your feedback & help us to improve this site.