资源简介
1.实验目的:用高级语言编写和调试一个或多个作业调度的模拟程序,以加深对作业调度算法的理解。
2.实验要求(设计要求)
编写并调试一个单道处理系统的作业等待模拟程序。
作业等待算法:分别采用,最短作业优先(SJF)、响应比高者优先(HRN)的调度算法。
对每种调度算法都要求打印每个作业开始运行时刻、完成时刻、周转时间、带权周转时间,以及这组作业的平均周转时间及带权平均周转时间,以比较各种算法的优缺点。
代码片段和文件信息
// Arithmetic.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “Arithmetic.h“
#include “ArithmeticDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CArithmeticApp
BEGIN_MESSAGE_MAP(CArithmeticApp CWinApp)
//{{AFX_MSG_MAP(CArithmeticApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CArithmeticApp construction
CArithmeticApp::CArithmeticApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CArithmeticApp object
CArithmeticApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CArithmeticApp initialization
BOOL CArithmeticApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CArithmeticDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 21280 2008-01-06 16:01 HW1\Arithmetic\Arithmetic.aps
文件 1407 2008-01-06 16:47 HW1\Arithmetic\Arithmetic.clw
文件 2119 2007-11-29 15:49 HW1\Arithmetic\Arithmetic.cpp
文件 4516 2007-11-29 17:12 HW1\Arithmetic\Arithmetic.dsp
文件 545 2007-11-29 15:49 HW1\Arithmetic\Arithmetic.dsw
文件 1368 2007-11-29 15:49 HW1\Arithmetic\Arithmetic.h
文件 1191 2007-12-03 13:26 HW1\Arithmetic\Arithmetic.plg
文件 5699 2007-12-03 13:15 HW1\Arithmetic\Arithmetic.rc
文件 1545 2007-11-30 20:03 HW1\Arithmetic\ArithmeticDlg.h
文件 2220032 2008-10-28 21:18 HW1\Arithmetic\Debug\Arithmetic.exe
文件 2482016 2008-10-28 21:18 HW1\Arithmetic\Debug\Arithmetic.ilk
文件 8820 2007-12-03 13:22 HW1\Arithmetic\Debug\Arithmetic.res
文件 222208 2008-01-06 16:01 HW1\Arithmetic\Debug\vc60.idb
文件 372736 2007-12-03 13:26 HW1\Arithmetic\Debug\vc60.pdb
文件 11558 2008-10-28 21:18 HW1\Arithmetic\Debug\BuildLog.htm
文件 146 2008-10-28 21:18 HW1\Arithmetic\Debug\Arithmetic.exe.em
文件 691200 2008-10-28 21:18 HW1\Arithmetic\Debug\vc80.idb
文件 13434880 2008-10-28 21:18 HW1\Arithmetic\Debug\Arithmetic.pch
文件 692224 2008-10-28 21:18 HW1\Arithmetic\Debug\vc80.pdb
文件 330814 2008-10-28 21:18 HW1\Arithmetic\Debug\StdAfx.obj
文件 7069 2008-10-28 21:18 HW1\Arithmetic\Debug\Lnode.obj
文件 91107 2008-10-28 21:18 HW1\Arithmetic\Debug\Llist.obj
文件 7056 2008-10-28 21:18 HW1\Arithmetic\Debug\FCFS.obj
文件 96123 2008-10-28 21:18 HW1\Arithmetic\Debug\ArithmeticDlg.obj
文件 21622 2008-10-28 21:18 HW1\Arithmetic\Debug\Arithmetic.obj
文件 212 2008-10-28 21:18 HW1\Arithmetic\Debug\Arithmetic.exe.em
文件 9448448 2008-10-28 21:18 HW1\Arithmetic\Debug\Arithmetic.pdb
文件 145 2008-10-28 21:18 HW1\Arithmetic\Debug\Arithmetic.exe.intermediate.manifest
文件 67 2008-10-28 21:18 HW1\Arithmetic\Debug\mt.dep
目录 0 2007-12-03 13:26 HW1\Arithmetic\Debug
............此处省略25个文件信息
- 上一篇:VC/C++的旅游管理系统
- 下一篇:C++透视自瞄原理学习.rar
评论
共有 条评论