Sponsored Links
This presentation is the property of its rightful owner.
1 / 244

فصل اول PowerPoint PPT Presentation


  • 121 Views
  • Uploaded on
  • Presentation posted in: General

ساختار فایل ها (ذخیره و بازیابی اطلاعات) تهیه کننده : جعفر پورامینی منبع: سیستم و ساختار فایل مولف: زولیک تعداد واحد:3 www.darage1web.gigfa.com. فصل اول. آشنایی با طراحی و مشخصات ساختار فایل ها. هدف کتاب.

Download Presentation

فصل اول

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


( ) : : : :3www.darage1web.gigfa.com



  • .



  • ( ) ( n)

  • AVL ( log d)

  • B

  • B+: B


:

    • :



.

. . .


OPEN

FD=OPEN(FILENAME,FLAGS[,PMODE])

  • FD: .

  • FILENAME: .

  • FLAGS: OPEN .

  • PMODE: .


  • .

  • .


READ(SOURCE_FILE,DESTINATION_ADDR,SIZE)

WRITE(DESTINATION_FILE,SOURCE_ADDR,SIZE)

  • DESTINATION:

  • SOURCE:

  • SIZE:


: .

SEEK(SOURCE_FILE,OFFSET)

SOURCE_FILE:

OFFSET:


C

POS=FSEEK(FILE,BYTE_OFFSET,ORIGIN)

POS: FSEEK .

FILE: FSEEK .

BYTE_OFFSET: .


#INCLUDE<STDIO.H>

Main( ) {

Char ch ;

FILE *file ;

Char filename [20] ;

Printf (" enter the name of the file") ;//step 1

Gets (filename) ;//step 2

File = fopen (filename, "r") ;//step 3

While (fread(&ch, 1, 1, file) ! = 0) ;//step 4a

Fwrite (&ch, 1, 1, student) ;//step 4b

Fclose (file) ; //step 5

}


++ C:

#include <fsream.h>

main ( ) {

char ch ;

fstream file ;

char file name [20] ;

cout << "enter the name of the file: "; //step 1

cin >> filename;//step 2

file . open (filename,ios::in); //step 3

file . unsetf(ios::skipws);

while (1)

{

file >> ch; //step 4a

if (file.fail ()) break;

cout << ch; //step 4b

}

file . close (); //step 5

}


.

.


BIN

USR

USR6

DEV

BIN

LIB

ADDBCC

KBD

TAPE

YACC

MYDIR

LIB

CONSOLE

LIBS.A

LIBM.A

ADDF

DF


  • .



  • .


  • (DASD): .

  • : .


  • .

  • .


  • :


  • (TRACK)

  • (SECTOR)

  • .


  • .

  • .



  • = *

  • = *

  • = *




  • ( .)

  • ( .)



:

  • .

  • .


. :

  • .

  • .


  • .

  • .

  • .


:




  • .


:

=( / )*


:

  • (multiprogramming)

  • (striping)

  • (parallelism)




7(A) 9(B)


  • . . 1 . . .


:

  • .


:


=b

=g

=n


:s

S=n*(b+g)


/ =b

=b


:

:

= /


  • :

  • = *


  • .

  • .

  • .

  • .


CD_ROM

  • : -

  • :


  • CD_ROM


  • .


  • CD_ROM 600 , .


  • CD_ROM .


CVA CAV


  • .


DVD(Digital versatile Disk )

  • 1997 DVD Forum CD (Digital video pisk) DVD 8 .

  • DVD . (Digital video Disk) .


  • DVD CD DVD DVD 20 CD. DVD . DVD DVD DVD DVD .


DVD

  • DVD (18- DVD and 10- DVD 9- DVD 5- DVD 4- DVD 3- DVD 2- DVD 1- DVD) DVD .


dvd


  • DVD : video- DVD Data- DVD Audio- DVD .

  • Duta - DVD CD ROM CD video- DVD Data- DVD VHS .


/ . .


  • :

  • .

  • . .


  • CPU , .


  • .

  • .


  • , , .


  • . .



  • .

  • .

  • .

  • .



1:

  • .


2:

( 256) .

.


3 :

.

.


4 :

.

.


  • .

  • .

  • .


  • .

  • .

  • .

  • .

  • .


1 :

  • , .

  • , , .


2 : .

  • , .


3: .

  • .

  • .


4 : .

  • , .


5 : .

  • , .


raid raid



. .


.


N n .

n n/2 .


  • , .


  • , .

  • o(N) .


  • , .

  • .


  • .

  • , , .


, .


  • .


:


  • .

  • , .


, .


.




  • IEEE 32 , 64 128 8 , 16 32 .


dd . dd , .


dd :



  • .

  • .

  • .



  • .

  • .


.


.

.


  • .


  • system v .system v pack unpack .


  • .

  • .



. .


.

  • .

  • .


:

  • .


:

  • .

  • .


.

.


:

  • .

  • .


:

  • .

  • .

  • , .


  • .

  • .


  • (first fit)

  • (best fit)

  • (worst fit)


best fit


worst fit

.


  • n

    [log n]+1 .

  • n

    n/2


  • .

  • .

  • .


  • , .



(x , a ) . x a .


  • . . .


  • , . 1972 B . B : B , .



  • , .


  • . , .


  • .


  • :


  • . , AVL


.


. .


  • ,

  • ,


:


,

io buffer .


,

.


  • .


, .


. .


:

  • .


.

false . remove insert true .


.


  • .

  • .


:

  • B .


1:

  • .


2:

  • .


3:

  • .


  • , .


  • .


  • .



:


  • .

  • .



  • . .


  • .


:

  • , .

  • , .



  • .

  • .


In +match (char * List1Name, char * List2 name, char * outpute listName)

{

Int More items;

Initialize List (1, List Name)

Initialize List (2, List Name)

Initialize output (Output List Name)

More items; = next ItemINList (1)86 Next ItemInList (2)


While (More items)

{

If (Item (1) < Item (2))

More items= next Item List (1);

Else If Item (1) = Item (2)

{

Process item (1) ; // Match found

More items= next ItemInList;

}

Else

More items = next ItemInList(2)

}

finishup();

Return 1;

}



k

,


k :

  • Int minitem = minindex (item , k )

  • Process item ( minitem),

  • For (i=0 ; i<k ; i++ )

  • If ( item (minitem) = = item(i)

  • More items[i] = nextiteminlist(i);



:

  • .

  • .

  • 12 1 i 2i,2i+1 .




char * Heap::Remove ( ) }// remove the smallest element , reorder the Heap

// put the smallest value into 'val' for use in return

char * val = HeapArray [1];

// put largest value into root

HeapArray [1] = HeapArray [NumElements];

// decrease the number of elements

NumElements - - ;

// reorder the heap by exchanging and moving down

int k = 1 ; //node of heap that contains the largest value

int newK ; // node to exchange with largest value

while (2 * K <= NumElements ) //K has at least one child

{ // set nemK to the index of smallest child of K

if Compare (2 * k , 2 * K + 1) < 0 ) newK = 2 * K;

else newK = 2 * K + 1 ;

if (Compar (K,newK) < 0) break ; // in order

Exchange (K,newK ); // K and newK out of order

K = NEWk ; // continue down the tree

}

return val ; }


K-D

  • . K-D .

  • K-D . .


K-D


:

  • , , .

  • / .




  • i/o


  • i/o


  • io




80 .


B


  • B .

  • AVL (paged).

  • .

  • B .

  • B

  • BTreeNode B .

  • BTree B .

  • B

  • B .

  • B B* B .


  • :

  • : ,



:

  • .

  • .


. . , .


.



AVL

  • .

  • AVL .


B

" B " 1960 . . . . 1972 " " B .


B

B . .


B

  • .

  • : .


  • FINDLEAF .

  • .

  • , .


B m

  • m .

  • [m/2] .

  • .

  • .

  • , .


B*

  • m .

  • [(2m-1)/3] .

  • .

  • .


LRU

  • .


B

B log K I I K .


PAGE FAULT

  • .


:

  • .

  • .


B+


  • .

  • .

  • .

  • B B+ B+ (prefix B+ tree).

  • B B+ (separators) .

  • B+ B+ B.


:

  • . .


  • . .


:

  • . .


:

  • .


:

  • . .


:

  • . .


  • . (RRN) . RRN (BOF) . RRN

  • :

  • = + ( RRN 1 ) * R


RR

  • :

  • = + ( RRN 1 ) * R


  • .


  • ( ) .


  • .


B :

  • .

  • .


  • . .

  • , , , . , .


B+

B+ , B+ .

B . , . , . . .


B+

  • , .

  • . , .


  • B+ B+ B+ . , .


  • , .

  • .

  • , .


  • , . .


:

  • , . , , .


2. , B+ B .


3. B+ . , .


: B

  • :


1:

  • , . , , , .


2:

  • B B+ . .


  • . , .


B B+ B+

1. . . , . .


2. . .


3. , .

4. , .


5. .

6. .


B B+

B B+ B+ .


B+ B

  • .

  • , .



  • Login