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

Автор: Пользователь скрыл имя, 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 Кб (Скачать)

        jLabel1.setText("Процессор"); 

        jLabel2.setText("Количество обращений  к ОП"); 

        jLabel8.setText("Обращения процессора"); 

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

        jCheckBox1.setText("Принцип локальности");

        jCheckBox1.setEnabled(false);

        jCheckBox1.addItemListener(new java.awt.event.ItemListener() {

            public void itemStateChanged(java.awt.event.ItemEvent evt) {

                jCheckBox1ItemStateChanged(evt);

            }

        }); 

        jSlider2.setSnapToTicks(true);

        jSlider2.setToolTipText("%");

        jSlider2.setValue(0);

        jSlider2.setAutoscrolls(true);

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

        jSlider2.setEnabled(false);

        jSlider2.setName("%"); // NOI18N

        jSlider2.addChangeListener(new javax.swing.event.ChangeListener() {

            public void stateChanged(javax.swing.event.ChangeEvent evt) {

                jSlider2StateChanged(evt);

            }

        }); 

        jTextArea1.setBackground(new java.awt.Color(240, 240, 240));

        jTextArea1.setColumns(20);

        jTextArea1.setEditable(false);

        jTextArea1.setFont(new java.awt.Font("Times New Roman", 0, 12)); // NOI18N

        jTextArea1.setLineWrap(true);

        jTextArea1.setRows(5);

        jTextArea1.setText("Данный принцип позволяет выбрать ту часть(в процентах) оперативной памяти, к которой будет обращаться процессор.");

        jTextArea1.setWrapStyleWord(true);

        jTextArea1.setEnabled(false);

        jScrollPane4.setViewportView(jTextArea1); 

        jLabel16.setText("  0"); 

        jLabel17.setText("50"); 

        jLabel18.setText("100"); 

        jTextField9.setEditable(false);

        jTextField9.setText("0%");

        jTextField9.setEnabled(false); 

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

        jPanel6.setLayout(jPanel6Layout);

        jPanel6Layout.setHorizontalGroup(

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

            .addGroup(jPanel6Layout.createSequentialGroup()

                .addContainerGap()

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

                    .addGroup(jPanel6Layout.createSequentialGroup()

                        .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE)

                        .addContainerGap())

                    .addGroup(jPanel6Layout.createSequentialGroup()

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

                            .addGroup(jPanel6Layout.createSequentialGroup()

                                .addComponent(jCheckBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE)

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

                                .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))

                            .addComponent(jSlider2, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE)

                            .addGroup(jPanel6Layout.createSequentialGroup()

                                .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)

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

                                .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)

                                .addGap(70, 70, 70)

                                .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)))

                        .addContainerGap(18, Short.MAX_VALUE))))

        );

        jPanel6Layout.setVerticalGroup(

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

            .addGroup(jPanel6Layout.createSequentialGroup()

                .addContainerGap()

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

                    .addComponent(jCheckBox1)

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

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

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

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

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

                    .addComponent(jLabel16)

                    .addComponent(jLabel18)

                    .addComponent(jLabel17))

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

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

                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

        ); 

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

        jPanel1.setLayout(jPanel1Layout);

        jPanel1Layout.setHorizontalGroup(

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

            .addGroup(jPanel1Layout.createSequentialGroup()

                .addContainerGap()

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

                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)

                    .addComponent(jLabel1)

                    .addComponent(RefCPU, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)

                    .addComponent(jLabel8)

                    .addComponent(jLabel2))

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

                    .addGroup(jPanel1Layout.createSequentialGroup()

                        .addGap(98, 98, 98)

                        .addComponent(jButton1)

                        .addGap(18, 18, 18))

                    .addGroup(jPanel1Layout.createSequentialGroup()

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

                        .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                        .addContainerGap())))

        );

        jPanel1Layout.setVerticalGroup(

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

            .addGroup(jPanel1Layout.createSequentialGroup()

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

                    .addGroup(jPanel1Layout.createSequentialGroup()

                        .addGap(11, 11, 11)

                        .addComponent(jLabel1)

                        .addGap(18, 18, 18)

                        .addComponent(jLabel2)

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

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

                        .addGap(11, 11, 11)

                        .addComponent(jLabel8)

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

                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE))

                    .addGroup(jPanel1Layout.createSequentialGroup()

                        .addGap(24, 24, 24)

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

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

                        .addComponent(jButton1)))

                .addContainerGap())

        ); 

        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(366, 10, 460, 240)); 

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

        Statistics.setColumns(20);

        Statistics.setEditable(false);

        Statistics.setRows(5);

        jScrollPane3.setViewportView(Statistics); 

        jLabel9.setText("Подождите..."); 

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);

        jPanel5.setLayout(jPanel5Layout);

        jPanel5Layout.setHorizontalGroup(

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

            .addGroup(jPanel5Layout.createSequentialGroup()

                .addContainerGap()

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

                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 698, Short.MAX_VALUE)

                    .addComponent(jLabel9)

                    .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 698, Short.MAX_VALUE))

                .addContainerGap())

        );

        jPanel5Layout.setVerticalGroup(

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

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

                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 171, javax.swing.GroupLayout.PREFERRED_SIZE)

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

                .addComponent(jLabel9)

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

                .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)

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

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

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