Алгоритмы кэширования данных и их эффективность

Автор: Пользователь скрыл имя, 09 Марта 2011 в 11:30, курсовая работа

Краткое описание

Цель исследования – выявить эффективность алгоритмов кэширования данных LRU, LFU.



Задачи исследования:

•проанализировать предметную область;
•спроектировать и реализовать программную систему для анализа эффективности алгоритмов кэширования данных LRU, LFU;
•провести сравнительный анализ эффективности алгоритмов кэширования данных LRU, LFU.

Оглавление

Введение 3

1.Анализ предметной области 4
1.Структура кэш-памяти и схема ее работы 4
2.Алгоритмы кэширования 5
3.Ассоциативность и принципы локальности кэш-памяти 6
4.Словарь предметной области 7
2.Проектирование архитектуры разрабатываемой системы 8
1.Иерархия классов 8
2.Блок – схемы алгоритмов 8
3.Реализация системы на языке высокого уровня 10
4.Тестирование приложения 11
5.Исследование эффективности алгоритмов 13
Заключение 17

Список использованной литературы 18

Приложение 19

Файлы: 4 файла

Графики.xlsx

— 16.78 Кб (Открыть, Скачать)

Курсовая работа.docx

— 413.90 Кб (Открыть, Скачать)

Приложение.docx

— 41.71 Кб (Скачать)

                LRUbuttonActionPerformed(evt);

            }

        }); 

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);

        jPanel3.setLayout(jPanel3Layout);

        jPanel3Layout.setHorizontalGroup(

            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

            .addGroup(jPanel3Layout.createSequentialGroup()

                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                    .addGroup(jPanel3Layout.createSequentialGroup()

                        .addContainerGap()

                        .addComponent(jLabel6))

                    .addGroup(jPanel3Layout.createSequentialGroup()

                        .addGap(73, 73, 73)

                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)

                            .addComponent(LFUbutton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                            .addComponent(LRUbutton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))))

                .addContainerGap(13, Short.MAX_VALUE))

        );

        jPanel3Layout.setVerticalGroup(

            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

            .addGroup(jPanel3Layout.createSequentialGroup()

                .addContainerGap()

                .addComponent(jLabel6)

                .addGap(33, 33, 33)

                .addComponent(LRUbutton, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)

                .addGap(31, 31, 31)

                .addComponent(LFUbutton, javax.swing.GroupLayout.DEFAULT_SIZE, 38, Short.MAX_VALUE)

                .addGap(65, 65, 65))

        ); 

        getContentPane().add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(830, 10, 230, 240)); 

        jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); 

        jLabel10.setFont(new java.awt.Font("Tahoma", 0, 18));

        jLabel10.setText(" LRU        LFU"); 

        jLabel11.setFont(new java.awt.Font("Tahoma", 0, 18));

        jLabel11.setText("Попаданий"); 

        jLabel12.setFont(new java.awt.Font("Tahoma", 0, 18));

        jLabel12.setText("Промахов"); 

        jLabel13.setFont(new java.awt.Font("Tahoma", 0, 18));

        jLabel13.setText("Процент попаданий"); 

        jLabel14.setFont(new java.awt.Font("Tahoma", 0, 18));

        jLabel14.setText("Процент промахов"); 

        jTextField1.setEditable(false); 

        jTextField2.setEditable(false); 

        jTextField3.setEditable(false); 

        jTextField4.setEditable(false); 

        jTextField5.setEditable(false); 

        jTextField6.setEditable(false); 

        jTextField7.setEditable(false); 

        jTextField8.setEditable(false); 

        jLabel15.setFont(new java.awt.Font("Tahoma", 0, 18));

        jLabel15.setText("Сравнение алгоритмов"); 

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);

        jPanel4.setLayout(jPanel4Layout);

        jPanel4Layout.setHorizontalGroup(

            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

            .addGroup(jPanel4Layout.createSequentialGroup()

                .addContainerGap()

                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                    .addGroup(jPanel4Layout.createSequentialGroup()

                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addComponent(jLabel11)

                            .addComponent(jLabel12)

                            .addComponent(jLabel13)

                            .addComponent(jLabel14))

                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                .addGroup(jPanel4Layout.createSequentialGroup()

                                    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

                                    .addGap(18, 18, 18)

                                    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))

                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

                                    .addComponent(jLabel10)

                                    .addGroup(jPanel4Layout.createSequentialGroup()

                                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

                                        .addGap(18, 18, 18)

                                        .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))))

                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

                                .addGroup(jPanel4Layout.createSequentialGroup()

                                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

                                    .addGap(18, 18, 18)

                                    .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))

                                .addGroup(jPanel4Layout.createSequentialGroup()

                                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                                    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))))

                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()

                        .addComponent(jLabel15)

                        .addGap(60, 60, 60)))

                .addContainerGap(17, Short.MAX_VALUE))

        );

        jPanel4Layout.setVerticalGroup(

            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

            .addGroup(jPanel4Layout.createSequentialGroup()

                .addContainerGap()

                .addComponent(jLabel15)

                .addGap(38, 38, 38)

                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

                    .addGroup(jPanel4Layout.createSequentialGroup()

                        .addComponent(jLabel11)

                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

                        .addComponent(jLabel12)

                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

                        .addComponent(jLabel13)

                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

                        .addComponent(jLabel14))

                    .addGroup(jPanel4Layout.createSequentialGroup()

                        .addComponent(jLabel10)

                        .addGap(11, 11, 11)

                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                            .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                            .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                            .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                            .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                            .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

                            .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

                            .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))

                .addContainerGap(56, Short.MAX_VALUE))

        ); 

        getContentPane().add(jPanel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(740, 260, 320, 260)); 

        jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jPanel1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); 

        AreaCPU.setColumns(20);

        AreaCPU.setEditable(false);

        AreaCPU.setLineWrap(true);

        AreaCPU.setRows(5);

        AreaCPU.setEnabled(false);

        jScrollPane1.setViewportView(AreaCPU); 

        RefCPU.setEnabled(false); 

        jButton1.setText("Ввести");

        jButton1.setEnabled(false);

        jButton1.addActionListener(new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {

                jButton1ActionPerformed(evt);

            }

        }); 

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18));

Титульник и содержание.docx

— 21.73 Кб (Открыть, Скачать)

Информация о работе Алгоритмы кэширования данных и их эффективность