Thursday, July 20, 2017

Latihan Soal Index Sequential File

Soal!

Diketahui data suatu sistem dikelola menggunakan struktur sequential dengan parameter sbb :

  • Jumlah record file (n) = 1000000 record
  • Jumlah field (a) = 8 byte
  • Jumlah rata-rata nilai (V) = 25 byte

Parameter harddisk

  • Putaran disk = 8000 rpm
  • Seek time (s) = 5 ms
  • Transfer rate (t) = 2048 byte/s
  • TRW = 2 ms

Parameter penyimpanan

  • Ukuran block (B) = 4096 byte
  • Ukuran pointer block (P) = 8 byte
  • Ukuran interblock gap (G) = 1024 byte

Parameter reorganisasi

  • File log transaksi (o) = 5000 record

Parameter pemrosesan

  • Waktu untuk pemrosesan block (c) = 2 ms
Carilah fanout(y), height(x), R, TF, TN, TI, TU, TX, TY!

Jawaban:

  1. y = (B) / (V + P)
    y = (4096) / (25 + 8)
    y = 124,12

  2. height (x)
    R = a.V + P
    R = 8.25 + 8
    R = 208

    Bfr = B/R
    Bfr = 4096/208
    Bfr = 19,69

    x = ylog (n/Bfr)
    x = 124,12log (1000000/19,69)
    x = 2,24

  3. TF
    Btt = B/t
    Btt = 4096/2048
    Btt = 2

    r = 1/2 * ((60 * 1000)/RPM)
    r = 1/2 * ((60 * 1000)/8000)
    r = 3,75

    TF = (x + 1 + o/n)*(s + r + btt)
    TF = (2,24 + 1 + 5000/1000000)*(5 + 3,75 + 2)
    TF = 34,88

  4. TN = ((1/Bfr)*(s + r + btt))*((o/n)*(r + btt))
    TN = ((1/19,69)*(5 + 3,75 + 2))*((5000/1000000)*(3,75 + 2))
    TN = 0,01

  5. TI = TF + 5r + btt
    TI = 34,88 + 5.3,75 + 2
    TI = 55,63

  6. TU = TF + TRW + TI
    TU = 34,88 + 2 + 55,63
    TU = 92,551

  7. TX = TF + (n + o' - 1)TN
    TX = 34,88 + (1000000 + 5000 - 1)0,01
    TX = 10084,87

  8. TY
    WG = G / Bfr
    WG = 1024 / 19,69
    WG = 52

    WR = B / Bfr
    WR = 4096 / 19,69
    WR = 208,02

    W = WG + WR
    W = 52 + 208,02
    W = 260,02

    t' = (t/2) * {R / (R + W)}
    t' = (2048/2) * {208 / (208 + 260,02)}
    t' = 450,56

    TY = (((n + (o * Bfr)) / Bfr) * (r + btt)) + (((n + o) - d) * (R/t')) + ((V + P) / r)
    TY = (((1000000 + (5000 * 19,69)) / 19,69) * (3,75 + 2)) + (((1000000 + 5000) - 0) * (208/450,56)) + ((25 + 8) / 3,75)

    TY = 783085,2

Baca Post Lain :

Penyimpanan Sekunder
File Pile
Organisasi File Sequential
Index Sequential File
Latihan Soal Penyimpanan Sekunder
Latihan Soal Filepile
Latihan Soal Organisasi File Sequential
Latihan Soal Index Sequential File
Share:

Latihan Soal Organisasi File Sequential

Soal!

Parameter harddisk

  • Putaran disk = 8000 rpm
  • Seek time (s) = 5 ms
  • Transfer rate (t) = 2048 byte/s
  • TRW = 2 ms

Parameter penyimpanan

  • Metode blocking = fixed blocking
  • Ukuran block (B) = 4096 byte
  • Ukuran pointer block (P) = 8 byte
  • Ukuran interblock gap (G) = 1024 byte

Parameter file

  • Jumlah record file (n) = 100000 record
  • Jumlah field (a) = 8 byte
  • Jumlah nilai (V) = 25 byte

Parameter reorganisasi

  • File log transaksi (o) = 0 record

Parameter pemrosesan

  • Waktu untuk pemrosesan block (c) = 2 ms
Carilah R, TF, TN, TI, TU, TX, TY!

Jawaban:

  1. R = a.V
    R = 8.25
    R = 200

  2. TF, menggunakan metode fixed blocking
    Bfr = B/R
    Bfr = 4096/200
    Bfr = 20,48

    WG = G / Bfr
    WG = 1024 / 20,48
    WG = 50

    WR = B / Bfr
    WR = 4096 / 20,48
    WR = 200

    W = WG + WR
    W = 50 + 200
    W = 250

    t' = (t/2) * {R / (R + W)}
    t' = (2048/2) * {200 / (200 + 250)}
    t' = 450,56

    TF = 1/2n * (R/t')
    TF = 1/2100000 * (200/450,56)
    TF = 22000

  3. TN
    Btt = B/t
    Btt = 4096/2048
    Btt = 2

    TN = btt / Bfr
    TN = 2 / 20,48
    TN = 0,09

  4. TI = TF + 1/2(N/Bfr)(btt/TRW)
    TI = 22000 + 1/2(100000/20,48)(2/2)
    TI = 24441,4

  5. TU = TF + TRW
    TU = 22000 + 2
    TU = 22002

  6. TX = Tsort(o) + (n + o)(R/t')
    TX = 0 + (100000 + 0)(200/450,56)
    TX = 44000

  7. TY = Tsort (o) + 2 (n + o)(R/t')
    TY = 0 + 2 (100000 + 0)(200/450,56)
    TY = 88000

Baca Post Lain :

Penyimpanan Sekunder
File Pile
Organisasi File Sequential
Index Sequential File
Latihan Soal Penyimpanan Sekunder
Latihan Soal Filepile
Latihan Soal Organisasi File Sequential
Latihan Soal Index Sequential File
Share:

Latihan Soal File Pile

Soal!

Parameter harddisk

  • Putaran disk = 6000 rpm
  • Seek time (s) = 5 ms
  • Transfer rate (t) = 2048 byte/s
  • TRW = 2 ms

Parameter penyimpanan

  • Metode blocking = variable length spanned blocking
  • Ukuran block (B) = 1024 byte
  • Ukuran pointer block (P) = 8 byte
  • Ukuran interblock gap (G) = 512 byte

Parameter file

  • Jumlah record difile (n) = 10600 record
  • Jumlah rata-rata atribut (a') = 5 byte
  • Jumlah rata-rata field (A) = 7 byte
  • Jumlah rata-rata nilai (V) = 15 byte

Parameter reorganisasi

  • Jumlah penambahan record (o) = 1000 record
  • Jumlah record ditandai sebagai dihapus (d) = 200 byte
Carilah R, TF, TN, TI, TU, TX, TY!

Jawaban:

  1. R = a' (A + V + 2)
    R = 5 (7 + 15 + 2)
    R = 120

  2. TF, menggunakan metode Spanned Blocking
    Bfr = (B - P) / (R + P)
    Bfr = (1024 - 8) / (120 + 8)
    Bfr = 7,93

    W = P + (P + G) / Bfr
    W = 8 + (8 + 512) / 7,93
    W = 73,57

    t' = (t/2) * {R / (R + W)}
    t' = (2048/2) * {120 / (120 + 73,57)}
    t' = 634,8

    TF = 1/2n (R / t')
    TF = 1/210600 (120 / 634,8)
    TF = 1001,89

  3. TN = TF
    TN = 1001,89

  4. TI
    r = 1/2 * ((60 * 1000)/RPM)
    r = 1/2 * ((60 * 1000)/6000)
    r = 5

    Btt = B/t
    Btt = 1024/2048
    Btt = 0,5

    TI = s + r + btt + TRW
    TI = 5 + 5 + 0,6 + 2
    TI = 12,5

  5. TU = TF + TRW + TI
    TU = 1001,89 + 2 + 12,5
    TU = 1016,39

    TU = TF + TRW
    TU = 1001,89 + 2
    TU = 1003,89

  6. TX = 2TF
    TX = 2*1001,89
    TX = 2003,78

  7. TY = (n + o)(R + t') + (n + o - d)(R / t')
    TY = (10600 + 1000)(120 + 634,8) + (10600 + 1000 - 200)(120 / 634,8)
    TY = 4140

Baca Post Lain :

Penyimpanan Sekunder
File Pile
Organisasi File Sequential
Index Sequential File
Latihan Soal Penyimpanan Sekunder
Latihan Soal Filepile
Latihan Soal Organisasi File Sequential
Latihan Soal Index Sequential File
Share:

Latihan Soal Penyimpanan Sekunder

Soal!

Diketahui :
  • Seek time (s) = 10 ms
  • Kecepatan putar harddsik = 3000 rpm
  • Transfer rate (t) = 1024 byte/s
  • Ukuran blok (B) = 2048 byte
  • Ukuran record (R) = 128 byte
  • Ukuran gap (G) = 64 byte
  • Ukuran pointer (P) = 10
Cari r, Bfr, TR, Btt, W dan t'! (Menggunakan metode fixed blocking, spanned blocking dan unspanned blocking!)

Jawaban :
  1. r = 1/2 * ((60 * 1000)/RPM)
    r = 1/2 * ((60 * 1000)/3000)
    r = 10 s

  2. Bfr
    • Fixed Blocking
    • Bfr = B/R
      Bfr = 2048/128
      Bfr = 16

    • Spanned Blocking
    • Bfr = (B - P) / (R + P)
      Bfr = (2048 - 10) / (128 + 10)
      Bfr = 14,76

    • Unspanned Blocking
    • Bfr = (B - 1 / 2R)/(R + P)
      Bfr = (2048 - 1 / 2128)/(128 + 10)
      Bfr = 14,37

  3. TR = R/t
    TR = 128/1024
    TR = 0,125

  4. Btt = B/t
    Btt = 2048/1024
    Btt = 2

  5. W
    • Fixed Blocking
    • WG = G / Bfr
      WG = 64 / 16
      WG = 4

      WR = B / Bfr
      WR = 2048 / 16
      WR = 128

      W = WG + WR
      W = 4 + 128
      W = 132

    • Spanned Blocking
    • W = P + (P + G) / Bfr
      W = 10 + (10 + 64) / 14,76
      W = 15,01

    • Unspanned Blocking
    • W = P + (1/2R + G) / Bfr
      W = 10 + (1/2128 + 64) / 14,37
      W = 18,9

  6. t'
    • Fixed Blocking
    • t' = (t/2) * {R / (R + W)}
      t' = (1024/2) * {128 / (128 + 132)}
      t' = 250,88

    • Spanned Blocking
    • t' = (t/2) * {R / (R + W)}
      t' = (1024/2) * {128 / (128 + 15,01)}
      t' = 455,68

    • Unspanned Blocking
    • t' = (t/2) * {R / (R + W)}
      t' = (1024/2) * {128 / (128 + 18,9)}
      t' = 445,44

Baca Post Lain :

Penyimpanan Sekunder
File Pile
Organisasi File Sequential
Index Sequential File
Latihan Soal Penyimpanan Sekunder
Latihan Soal Filepile
Latihan Soal Organisasi File Sequential
Latihan Soal Index Sequential File
Share:

Wednesday, July 19, 2017

Index Sequential File

"Merupakan perpaduan terbaik dari teknik sequential dan random file"
Contoh : CD

Parameter Indeks

Rasio fan out Y, jumlah indeks di satu blok indeks.

y = (B) / (V + P)

Keterangan :

B = ukuran blok
V = ukuran field kunci (atribut/nilainya)
P = ukuran field pointer


Height(x), kedalaman indeks (Banyak level indek)

x = ylog (n/Bfr)

Keterangan :

n = jumlah record dalam satu file
y = fanout
Bfr = blocking factor

Ukuran record

R = a.V + P

Keterangan:

a = jumlah atribut (field) pada satu record
V = panjang nilai atribut
P = panjang field pointer

Ukuran record dipengaruhi 2 faktor :

  1. Pada daerah overflow => o' atau No'
  2. Pada daerah utama => Nm

Waktu Pengambilan Record Tertentu (TF)

  1. Pembacaan record tanpa membaca overflow (belum terjadi log transaksi).
  2. TF = (x + 1)*(s + r + btt)

  3. Pembacaan record yang telah disisipkan.
  4. TF = (x + 1 + o/n)*(s + r + btt)

Keterangan:

x = tingat indeks pada suatu file(untuk file sequential indeks tunggal/satu nilai x =1)
n = jumlah record pada file utama
o = jumlah record pada file overflow

Waktu Pengambilan Record Berikutnya (TN)

  1. Record berikutnya difile utama, maka hanya diperlukan pembacaan block (belum terjadi log transaksi)
  2. TN = (1/Bfr)*(s + r + btt)

  3. Pada file overflow (setea terjadi log transaksi)
  4. TN = ((1/Bfr)*(s + r + btt))*((o/n)*(r + btt))

Waktu Penyisipan Record (TI)

TI = TF + TRW + r + btt + TRW
TI = TF + 5r + btt

Waktu Pembaruan Record (TU)

  1. Pembaruan terhadap atribut kunci.
  2. TU = TF + TRW

  3. Pembaruan terhadap atribut non kunci. Jika atribut kunci berubah, maka :
    • Record yang dirubah ditandai sebagai dihapus
    • Record baru disisipkan
    TU = TF + TRW + TI

Waktu Pembacaan Seluruh Record (TX)

Membaca dari awal sampai akhir file secara serial (berurutan).
TX = TF + (n + o' - 1)TN

Proses Reorganisasi (TY)

TY = (((n + (o * Bfr)) / Bfr) * (r + btt)) + (((n + o) - d) * (R/t')) + ((V + P) / r)

Baca Post Lain :

Penyimpanan Sekunder
File Pile
Organisasi File Sequential
Index Sequential File
Latihan Soal Penyimpanan Sekunder
Latihan Soal Filepile
Latihan Soal Organisasi File Sequential
Latihan Soal Index Sequential File
Share:

Organisasi File Sequential

"Sequential adalah proses mengakses data secara berurut." Contoh : Tape.

Karakteristik :

  • Atribut data dikategorikan
  • Record data terurut

Ukuran Record (R)

R = a.V

Keterangan :

a = jumlah atribut (field) pada satu record
V = panjang rata-rata nilai atribut (byte)

Waktu Pengambilan Record Tertentu (TF)

  1. Pencarian menggunakan atribut non-kunci

    • Belum ada file log
    • TF = 1/2 waktu pencarian blok
      TF = 1/2b * (B/t') = 1/2n * (R/t')

      Keterangan :

      b = jumlah blok
      b = n/Bfr


    • Sudah ada file log
    • TFO = 1/2o * R/t'
      TF = 1/2(n + o)R / t'

  2. Pencarian menggunakan atribut kunci(pencarian biner)

    • Belum berbentuk log
    • TF = 2log(b)(s + r + btt + c)
      TF = 2log(n/Bfr)(s + r + btt + c)

    • Sudah berbentuk log
    • TF = 2log(n/Bfr)(s + r + btt + c) + TFO
      TF = 2log(n/Bfr)(s + r + btt + c) + 1/2o(R/t')

Waktu Pengambilan Record Berikutnya (TN)

TN = btt / Bfr

Waktu Penyisipan Record Baru (TI)

  • Cari, geser, sisip
  • TI = TF + 1/2(N/Bfr)(btt/TRW)

  • Memakai log file
  • TI = s + 3r + TRW + (TY/o)

Waktu Pembaruan Record (TU)

  • Bukan kunci
  • TU = TF + TRW

  • Terhadap kunci: cari record, hapus record, sisipkan record
  • TU = TF (main) + TI (file log)

Waktu Pembacaan Seluruh Record (TX)

TX = Tsort(o) + (n + o)(R/t')

Waktu Rreorganisasi File (TY)

TY = Tsort (o) + nold (R/t') + o (R/t') + nnew (R/t'')
TY = Tsort (o) + 2 (n + o)(R/t')

Baca Post Lain :

Penyimpanan Sekunder
File Pile
Organisasi File Sequential
Index Sequential File
Latihan Soal Penyimpanan Sekunder
Latihan Soal Filepile
Latihan Soal Organisasi File Sequential
Latihan Soal Index Sequential File
Share:

Tuesday, July 18, 2017

File Pile

Record Size (R)

R = a' (A + V + 2)

Keterangan :

a' = rata-rata jumlah atribut
A = ukuran rata-rata atribut
v = ukuran rata-rata nilai
2 = nilai separator/konstanta pemisah antar file/record

Waktu Pengambilan Record Tertentu (TF)

TF = 1/2n (R / t')

Keterangan :

n = jumlah record
R = banyak record
t' = bulk transfer time

Waktu Pengambilan Record Berikutnya (TN)

TN = TF

Waktu Penyisipan Record/Insert Record (TI)

TI = s + r + btt + TRW

Update Time (TU)

  • Hanya dilakukan penimpaan tanpa penyisipan diakhir file
  • TU = TF + TRW
  • Dilakukan penimpaan/penandaan hapus dan penyisipan diakhir file
  • TU = TF + TRW + TI

Waktu Pembacaan Seluruh Record (TX)

TX = 2TF = n(R/t')

Waktu Reorganisasi File (TY)

TY = (n + o)(R + t') + (n + o - d)(R / t')
o = n insert
d = n delete

Baca Post Lain :

Penyimpanan Sekunder
File Pile
Organisasi File Sequential
Index Sequential File
Latihan Soal Penyimpanan Sekunder
Latihan Soal Filepile
Latihan Soal Organisasi File Sequential
Latihan Soal Index Sequential File
Share: