پروژه و سورس Reed Solomon درس معماری ذخیره سازی

پروژه و سورس Reed Solomon درس معماری ذخیره سازی

به زبان سی C

به همراه دکیومنت و سورس با فرمت ورد

به همراه منابع اصلی

A Tutorial on Reed-Solomon Coding for Fault-Tolerance in RAID-like Systems

 

موضوع مقاله :

RAID   

 

به همراه سورس تمرینات درس به زبان سی و سی شارپ

جواب سوالات و تمرینات

 

پروژه:  Reed Solomon

تهیه کننده: جعفر عالی نژاد 

استاد: دکتر 

درس: معماری ذخیره سازی

-----------------------------------------------------------------------------------------------*/

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include <sys/time.h>

#include <sys/types.h>

#include <sys/stat.h>

#define prim_poly_16 0210013

typedef unsigned short unit;

typedef struct {

  int *condensed_matrix;  

  int *row_identities;   

} Condensed_Matrix;

extern void gf_modar_setup();

extern int gf_single_multiply(int a, int b);

extern int gf_single_divide(int a, int b);

extern void gf_fprint_matrix(FILE *f, int *m, int rows, int cols);

extern void gf_fast_add_parity(void *to_add, void *to_modify, int size);

extern void gf_add_parity(void *to_add, void *to_modify, int size);

extern void gf_mult_region(void *region, int size, int factor);

extern int gf_log(int value);

extern int *gf_make_vandermonde(int rows, int cols);

extern int *gf_make_dispersal_matrix(int rows, int cols);

extern Condensed_Matrix *gf_condense_dispersal_matrix(

                        int *disp,         

                        int *existing_rows,

                        int rows,

                        int  cols);

extern int *gf_invert_matrix(int *mat, int rows);

extern int *gf_matrix_multiply(int *a, int *b, int rows); 

extern void gf_write_matrix(FILE *f, int *a, int rows, int cols);

extern int *gf_read_matrix(FILE *f, int *rows, int *cols);

static int gf_already_setup = 0;

static int Modar_w = 16;

static int Modar_nw = 65536;

static int Modar_nwm1 = 65535;

static int Modar_poly = prim_poly_16;

static int *B_TO_J;

static int *J_TO_B;

static int Modar_M;

static int Modar_N;

static int Modar_Iam;

int gf_single_multiply(int xxx, int yyy)

{

  unsigned int sum_j;

  unit zzz;

  gf_modar_setup();

  if (xxx == 0 || yyy == 0) {

    zzz = 0;

  } else {

    sum_j = (int) (B_TO_J[xxx] + (int) B_TO_J[yyy]);

    if (sum_j >= Modar_nwm1) sum_j -= Modar_nwm1;

    zzz = J_TO_B[sum_j];

  }

  return zzz;

}

int gf_single_divide(int a, int b)

{

  int sum_j;

  gf_modar_setup();

  if (b == 0) return -1;

  if (a == 0) return 0;

  sum_j = B_TO_J[a] - B_TO_J[b];

  if (sum_j < 0) sum_j += Modar_nwm1;


پروژه و سورس Reed Solomon درس معماری ذخیره سازی به زبان سی C به همراه دکیومنت و سورس با فرمت ورد به همراه منابع اصلی A Tutorial on Reed-Solomon Coding for Fault-Tolerance in RAID-like Systems   موضوع مقاله : RAID      به همراه سورس تمرینات درس به زبان سی و سی شارپ جواب سوالات و تمرینات   پروژه:  Reed Solomon تهیه کننده: جعفر عالی نژاد استاد: دکتر درس: معماری ذخیره سازی ---------------------------------------------------------------------------- ...