【大三操作系统实验】 请求页式管理中的置换算法

2023-05-16

(1)FIFO算法总是选择在内存驻留时间最长的一页将其淘汰。FIFO算法认为调入内存的页不再被可能性要比其他页大,因而选择最先调入内存的页换出。

(2)LRU算法基本思想:当需要淘汰某一页时,选择离当前时间最近的一段时间内最久没有使用过的页先淘汰。

(3)OPT算法基本思想:在访问串中将来再也不出现的或是在离当前最远的位置上出现的页。

 

主要算法实现代码部分在Onqueding()

Code:
  1. // 置换算法Dlg.cpp : implementation file   
  2. //   
  3.   
  4. #include "stdafx.h"   
  5. #include "置换算法.h"   
  6. #include "置换算法Dlg.h"   
  7.   
  8. #ifdef _DEBUG   
  9. #define new DEBUG_NEW   
  10. #undef THIS_FILE   
  11. static char THIS_FILE[] = __FILE__;   
  12. #endif   
  13.   
  14. /   
  15. // CAboutDlg dialog used for App About   
  16.   
  17.      CRect rectSmall;  //收缩   
  18.      CRect rectLarge;  //扩展   
  19.      CRect rectrang_1;  //边缘           
  20.     bool flag=true;   
  21.     int i,j,k,m;   
  22.         int visit[19];   //访问数组   
  23.     int *count;  //停留标记   
  24.     int *mem;  //内存分配页   
  25. int FIFO(int *count_0,int num);   
  26. int OPT(int *count_0,int i,int num,int *vis);   
  27. class CAboutDlg : public CDialog   
  28. {   
  29. public:   
  30.     CAboutDlg();   
  31.   
  32. // Dialog Data   
  33.     //{{AFX_DATA(CAboutDlg)   
  34.     enum { IDD = IDD_ABOUTBOX };   
  35.     //}}AFX_DATA   
  36.   
  37.     // ClassWizard generated virtual function overrides   
  38.     //{{AFX_VIRTUAL(CAboutDlg)   
  39.     protected:   
  40.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support   
  41.     //}}AFX_VIRTUAL   
  42.   
  43. // Implementation   
  44. protected:   
  45.     //{{AFX_MSG(CAboutDlg)   
  46.     //}}AFX_MSG   
  47.     DECLARE_MESSAGE_MAP()   
  48. };   
  49.   
  50. CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)   
  51. {   
  52.     //{{AFX_DATA_INIT(CAboutDlg)   
  53.     //}}AFX_DATA_INIT   
  54. }   
  55.   
  56. void CAboutDlg::DoDataExchange(CDataExchange* pDX)   
  57. {   
  58.     CDialog::DoDataExchange(pDX);   
  59.     //{{AFX_DATA_MAP(CAboutDlg)   
  60.     //}}AFX_DATA_MAP   
  61. }   
  62.   
  63. BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)   
  64.     //{{AFX_MSG_MAP(CAboutDlg)   
  65.         // No message handlers   
  66.     //}}AFX_MSG_MAP   
  67. END_MESSAGE_MAP()   
  68.   
  69. /   
  70. // CMyDlg dialog   
  71.   
  72. CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/)   
  73.     : CDialog(CMyDlg::IDD, pParent)   
  74. {   
  75.     //{{AFX_DATA_INIT(CMyDlg)   
  76.     m_suanfa = -1;   
  77.     //}}AFX_DATA_INIT   
  78.     // Note that LoadIcon does not require a subsequent DestroyIcon in Win32   
  79.     m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);   
  80. }   
  81.   
  82. void CMyDlg::DoDataExchange(CDataExchange* pDX)   
  83. {   
  84.     CDialog::DoDataExchange(pDX);   
  85.     //{{AFX_DATA_MAP(CMyDlg)   
  86.     DDX_Control(pDX, IDC_rang, m_rang);   
  87.     DDX_Radio(pDX, IDC_RADIO1, m_suanfa);   
  88.     //}}AFX_DATA_MAP   
  89. }   
  90.   
  91. BEGIN_MESSAGE_MAP(CMyDlg, CDialog)   
  92.     //{{AFX_MSG_MAP(CMyDlg)   
  93.     ON_WM_SYSCOMMAND()   
  94.     ON_WM_PAINT()   
  95.     ON_WM_QUERYDRAGICON()   
  96.     ON_WM_MOUSEMOVE()   
  97.     ON_BN_CLICKED(IDC_queding, Onqueding)   
  98.     //}}AFX_MSG_MAP   
  99. END_MESSAGE_MAP()   
  100.   
  101. /   
  102. // CMyDlg message handlers   
  103.   
  104. BOOL CMyDlg::OnInitDialog()   
  105. {   
  106.     CDialog::OnInitDialog();   
  107.   
  108.     // Add "About..." menu item to system menu.   
  109.   
  110.     // IDM_ABOUTBOX must be in the system command range.   
  111.     ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);   
  112.     ASSERT(IDM_ABOUTBOX < 0xF000);   
  113.   
  114.     CMenu* pSysMenu = GetSystemMenu(FALSE);   
  115.     if (pSysMenu != NULL)   
  116.     {   
  117.         CString strAboutMenu;   
  118.         strAboutMenu.LoadString(IDS_ABOUTBOX);   
  119.         if (!strAboutMenu.IsEmpty())   
  120.         {   
  121.             pSysMenu->AppendMenu(MF_SEPARATOR);   
  122.             pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);   
  123.         }   
  124.     }   
  125.   
  126.     // Set the icon for this dialog.  The framework does this automatically   
  127.     //  when the application's main window is not a dialog   
  128.     SetIcon(m_hIcon, TRUE);         // Set big icon   
  129.     SetIcon(m_hIcon, FALSE);        // Set small icon   
  130.        
  131.     // TODO: Add extra initialization here   
  132.     /*  
  133.     CRect rect,rect_1;    
  134.     m_rang.GetWindowRect(&rect);  
  135.     GetWindowRect(&rect_1);  
  136.     rect_1.right=rect.right+2;  
  137.     SetWindowPos(NULL,0,0,rect_1.Width(),rect_1.Height(),  
  138.             SWP_NOMOVE | SWP_NOZORDER);  
  139.             */  
  140.     m_rang.GetWindowRect(&rectrang_1);   
  141.     GetWindowRect(&rectLarge);   
  142.     rectSmall.top=rectLarge.top;   
  143.     rectSmall.left=rectLarge.left;   
  144.     rectSmall.right=rectrang_1.right;   
  145.     rectSmall.bottom=rectLarge.bottom;   
  146.     //默认为FIFO算法   
  147.     m_suanfa=0;   
  148.     UpdateData(FALSE);   
  149.     return TRUE;  // return TRUE  unless you set the focus to a control   
  150. }   
  151.   
  152. void CMyDlg::OnSysCommand(UINT nID, LPARAM lParam)   
  153. {   
  154.     if ((nID & 0xFFF0) == IDM_ABOUTBOX)   
  155.     {   
  156.         CAboutDlg dlgAbout;   
  157.         dlgAbout.DoModal();   
  158.     }   
  159.     else  
  160.     {   
  161.         CDialog::OnSysCommand(nID, lParam);   
  162.     }   
  163. }   
  164.   
  165. // If you add a minimize button to your dialog, you will need the code below   
  166. //  to draw the icon.  For MFC applications using the document/view model,   
  167. //  this is automatically done for you by the framework.   
  168.   
  169. void CMyDlg::OnPaint()    
  170. {   
  171.     if (IsIconic())   
  172.     {   
  173.         CPaintDC dc(this); // device context for painting   
  174.   
  175.         SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);   
  176.   
  177.         // Center icon in client rectangle   
  178.         int cxIcon = GetSystemMetrics(SM_CXICON);   
  179.         int cyIcon = GetSystemMetrics(SM_CYICON);   
  180.         CRect rect;   
  181.         GetClientRect(&rect);   
  182.         int x = (rect.Width() - cxIcon + 1) / 2;   
  183.         int y = (rect.Height() - cyIcon + 1) / 2;   
  184.   
  185.         // Draw the icon   
  186.         dc.DrawIcon(x, y, m_hIcon);   
  187.     }   
  188.     else  
  189.     {   
  190.         CDialog::OnPaint();   
  191.     }   
  192.     CDC *pDC = GetWindowDC();   //获取窗口DC   
  193.     CDC *memDC  =   new   CDC;   //定义兼容DC   
  194. //  if(flag)   
  195. //  {   
  196.         memDC->CreateCompatibleDC(pDC);   
  197.     //加载位图   
  198.     CBitmap pBit;   
  199.     pBit.LoadBitmap(IDB_BITMAP1);   
  200.     CBitmap *pOldBit;   
  201.     //选位图进memDC   
  202.     pOldBit=(CBitmap *)memDC->SelectObject(&pBit);   
  203.     CRect rect;   
  204.     CRect rectrang;   
  205.     m_rang.GetWindowRect(&rectrang);   
  206.     GetWindowRect(&rect);   
  207.     rect.right=rectrang.right;   
  208.     BITMAP bitmap;   
  209.     pBit.GetBitmap(&bitmap);   
  210.     //pDC->BitBlt(0,0,rect.Width(),rect.Height(),memDC,0,0,SRCCOPY);   
  211.     pDC->StretchBlt(0,0,rect.Width(),rect.Height(),memDC,0,0,bitmap.bmWidth,bitmap.bmHeight,SRCCOPY);   
  212.     memDC->SelectObject(pOldBit);   
  213.     pDC->SetBkMode(TRANSPARENT);   
  214. //  flag=false;   
  215.        
  216. //  }   
  217. }   
  218.   
  219. // The system calls this to obtain the cursor to display while the user drags   
  220. //  the minimized window.   
  221. HCURSOR CMyDlg::OnQueryDragIcon()   
  222. {   
  223.     return (HCURSOR) m_hIcon;   
  224. }   
  225.   
  226. void CMyDlg::OnMouseMove(UINT nFlags, CPoint point)    
  227. {   
  228.     // TODO: Add your message handler code here and/or call default   
  229.        
  230.     if(point.x>= rectSmall.right-10)  //扩展   
  231.     {   
  232.            
  233.         SetWindowPos(NULL,0,0,rectLarge.Width(),rectLarge.Height(),   
  234.             SWP_NOMOVE |  SWP_NOZORDER);   
  235.         if(flag)   
  236.         {   
  237.         this->Invalidate(FALSE);   
  238.         flag=false;  //只闪烁一次   
  239.         }   
  240.     }   
  241.     else   //收缩   
  242.     {   
  243.         SetWindowPos(NULL,0,0,rectSmall.Width(),rectSmall.Height(),   
  244.             SWP_NOMOVE |  SWP_NOZORDER);   
  245.         flag=true;   
  246.     }   
  247.     //this->Invalidate(FALSE);   
  248.     CDialog::OnMouseMove(nFlags, point);   
  249. }   
  250.   
  251.   
  252. void CMyDlg::Onqueding()    
  253. {   
  254.     UpdateData();   
  255.     CListCtrl *m_list = new CListCtrl();   
  256.     m_list->Create(WS_CHILD | WS_VISIBLE |LVS_REPORT,CRect(20,20,545,400),this,102);   
  257.     //改为网状风格   
  258.     DWORD dwStyle=m_list->GetExtendedStyle();   
  259.     dwStyle |= LVS_EX_FULLROWSELECT;  //整行高亮所选中的行只适用Report Style   
  260.     dwStyle |= LVS_EX_GRIDLINES;           //网格线. 只适用Report Style   
  261.     m_list->SetExtendedStyle(dwStyle );   
  262.        
  263.     m_list->SetBkColor(RGB(50,200,50));//绿背景色   
  264.     m_list->SetTextColor(RGB(0,0,220)); //蓝文本色   
  265.     m_list->SetTextBkColor(RGB(50,200,50));  //绿文本背景色   
  266.     m_list->InsertColumn(0,"访问序列",LVCFMT_LEFT,75);   
  267.   
  268.        
  269.     int m_proc=this->GetDlgItemInt(IDC_COMBO1);  //获取组合框文本   
  270.     int m_mem=this->GetDlgItemInt(IDC_COMBO2);   
  271.     int stay;   
  272.     CString cs;   
  273.     bool flag1=true;   
  274.     if(m_mem)  //有值才动态定义   
  275.     {   
  276.         mem = new int[m_mem];   //内存分配数组   
  277.         memset(mem,-1,sizeof(int)*m_mem);  //初始化为-1   
  278.         count = new int[m_mem];   //标记驻留次数   
  279.         memset(count,0,sizeof(int)*m_mem);   //初始化为0   
  280.     }   
  281.        
  282.     if(m_proc)   
  283.     {          
  284.         for(j=1;j<19;j++)   //初始化列   
  285.         {   
  286.             visit[j]=rand()%m_proc;    //访问序列初始化   
  287.                
  288.             cs.Format("%d",visit[j]);   
  289.             m_list->InsertColumn(j,cs,LVCFMT_LEFT,25);   
  290.         }   
  291.     }   
  292.     for(k=0;k<m_mem;k++)    //初始化行,分配页   
  293.     {   
  294.         char cha[2];   
  295.         itoa(k,cha,10);   
  296.         cs="内存第页";  //汉字双字节,注意   
  297.         cs.Insert(6,cha);   
  298.         m_list->InsertItem(k,cs);   
  299.            
  300.     }   
  301.     if(m_mem &&m_proc)   
  302.     {   
  303.         for(i=1;i<19;i++)  //列   
  304.         {   
  305.             for(k=0;k<m_mem;k++,i++)    //行   
  306.             {   
  307.                    
  308.                 for(j=0;j<m_mem;j++)   //找出相等的内存页visit[i]与所有行比较   
  309.                     if(mem[j]==visit[i])   //若相等马上输出所有行   
  310.                     {   
  311.                         switch(m_suanfa)   
  312.                         {   
  313.                         case 1:   //FIFO变为LRU只需把逗留数组count置为0就可以了   
  314.                             count[j]=0;   //相同的内存页把逗留次数置0   
  315.                             break;   
  316.                         }   
  317.                         for(m=0;m<m_mem;m++)  //输出   
  318.                         {      
  319.                             if(mem[m]!=-1)   
  320.                             {   
  321.                                 cs.Format("%d",mem[m]);   
  322.                                 m_list->SetItemText(m,i,cs);   
  323.                                 count[m]++;   
  324.                                    
  325.                             }   
  326.                         }   
  327.                         k--;   
  328.                         flag1=false;   
  329.                         break;//找到相等的先输出所有行,,然后跳出   
  330.                     }   
  331.                     ///    
  332.                     if(flag1)      
  333.                     {      
  334.                         switch(m_suanfa)   
  335.                         {   
  336.                         case 0: //FIFO   
  337.                         case 1: //LRU   
  338.                             if(mem[m_mem-1]!=-1)    //内存页满,开始置换   
  339.                             {   
  340.                                 stay=FIFO(count,m_mem);   //谁的逗留时间最长   
  341.                                    
  342.                                 mem[stay]=visit[i];   //最长的被置换   
  343.                                 count[stay]=0;   //逗留次数清零   
  344.                             }   
  345.                             else    //内存页还没用完   
  346.                             {   
  347.                                 mem[k]=visit[i];   
  348.                             }                                                  
  349.                                 break;   
  350.                         case 2:  //OPT   
  351.                             if(mem[m_mem-1]!=-1)    //内存页满,开始置换   
  352.                             {   
  353.                                 stay=OPT(mem,i,m_mem,visit);   //谁的逗留时间最长   
  354.                                    
  355.                                 mem[stay]=visit[i];   //最长的被置换   
  356.                             }   
  357.                             else    //内存页还没用完   
  358.                             {   
  359.                                 mem[k]=visit[i];   
  360.                             }   
  361.                                
  362.                                 break;   
  363.                         }//switch   
  364.                         for(m=0;m<m_mem;m++)  //输出所有行   
  365.                                 if(mem[m]!=-1)   
  366.                                 {   
  367.                                     CString cst;   
  368.                                     cst.Format("%d",mem[m]);   
  369.                                     m_list->SetItemText(m,i,cst);   
  370.                                     count[m]++;  //标记停留次数   
  371.                                 }   
  372.                     }   
  373.                     flag1=true;   
  374.             ///            
  375.             }//for(k   
  376.             if(k==m_mem) i--;  //有两个i++   
  377.         }//for(i   
  378.         delete []count;   
  379.         delete []mem;   
  380.     }//if   
  381.     UpdateData(FALSE);   
  382. }   
  383.   
  384. int FIFO(int *count_0,int num)   
  385. {   
  386.     int Max=count_0[0];   
  387.     int Max_stay=0;   
  388.     for(int n=1;n<num;n++) //找出最大数的下标   
  389.      if(Max < count_0[n])   
  390.         {   
  391.             Max=count_0[n];   
  392.             Max_stay=n;   
  393.         }   
  394.         return Max_stay;   
  395. }   
  396. int *L;   
  397. int OPT(int *temp_mem,int i,int num,int *vis)   
  398. {   
  399.     int Max;   
  400.     int Max_stay;   
  401.     int p=i+1;   
  402.     L = new int[num];   
  403.     memset(L,0,sizeof(int)*num);  //从0开始   
  404.     for(int n=0;n<num;n++)   
  405.         for(i=p;i<19;i++)  //下一个开始比   
  406.         if(temp_mem[n]!=vis[i]) L[n]++;   
  407.         else break;   
  408.         Max=L[0];   
  409.         Max_stay=0;   
  410.         for(int h=0;h<num;h++)   //找出最大数的下标   
  411.         {   
  412.            
  413.             if(Max < L[h])   
  414.             {   
  415.                 Max=L[h];   
  416.                 Max_stay=h;   
  417.             }   
  418.         }   
  419.             delete []L;   
  420.     return Max_stay;   
  421. }   

 

 

 

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

【大三操作系统实验】 请求页式管理中的置换算法 的相关文章

  • C# NModbus的主从站开发以及Modbus Slave、Modbus Poll工具的使用

    NModbus的主站开发 1 开发环境要求 xff1a PC端作为主站 xff0c 控制器作为从站 2 PC端初始化代码 xff1a serialPort 61 new SerialPort serialPort PortName 61 3
  • OpenCVSharp Mat.Set<T>修改像素颜色

    笔记 xff1a Mat Set lt T gt 方法修改图像中的颜色 xff0c T的类型不能是Scalar 应为Vec3b xff0c 否则颜色修改失败 C 代码 xff1a Mat labs 61 new Mat int counts
  • VSCode idea 配置xml文件的dtd约束文件

    如上图配置XML文件的智能提示功能通过dtd文件 xff1a 1 通过VSCode 的扩展功能下载XML插件 xff08 注意 xff1a 插件内是包含dtd文件配置功能 xff09 配置方式 xff1a 1 DOCTYPE xff1a l
  • 关于0xAA和0x55

    许多串口通讯中测试或握手信号使用AA或55这两个特殊的十六进制数 xff0c 在许多PIC内部的 EEPROM 改写也使用这两个数作为敲门砖 xff0c 初学者可能不解何为 xff0c 其实如果将这两个数展开成二进制就可明白为什么 xff1
  • APS .Net MVC 之APIController与Controller的区别

    APIControllerController开发模式WebAPIMVC命名空间System Web HttpSystem Web Mvc返回方式json text或者xml texthtml textaction的默认请求方式postpo
  • DBeaver连接informix数据库乱码

    在工具栏选择数据库 驱动管理 informix编辑 xff0c 示例URL中添加NEWCODESET 61 utf8 8859 1 819 CLIENT LOCALE 61 en US utf8 DB LOCALE 61 en US 885
  • c语言——http编程

    HTTP协议简介 超文本传输协议是一种用于分布式 协作式和超媒体信息系统的应用层协议 HTTP是一个客户端终端 xff08 用户 xff09 和服务器端 xff08 网站 xff09 请求和应答的标准 xff08 一般基于TCP xff09
  • 串口开发之环形缓冲区

    01 简介 串口的基本应用 xff0c 使用串口中断接收数据 xff0c 串口中断发送回包 xff08 一般可以使用非中断形式发送回包 xff0c 在数据接收不频繁的应用中 串口接收中断保证串口数据及时响应 xff0c 使用非中断方式发送回
  • stl中的智能指针类详解

    C 43 43 98 03的尝试 std xff1a xff1a auto ptr C 43 43 11标准废弃了std xff1a xff1a auto ptr xff08 在C 43 43 17标准中被移除 xff09 xff0c 取而
  • 对于ROS的工作空间的理解(一)

    对于每一个任务 xff0c 可以在根目录下为它分配一个工作空间 mkdir p catkin ws src xff08 src 源码 xff09 cd catkin ws catkin make 编译 xff0c 生成devel xff08
  • stc-isp协议

    一 数据封装格式 包头 标示 数据包长度 命令字 内容 校验 包尾 1 包头 xff1a 2字节 xff0c 固定为 xff1a 0x46 xff0c 0xB9 2 标示 xff1a 1字节 xff0c 分两种 xff0c ARM发给MCU
  • 干货!串口通讯的起始、数据、停止位都是怎么分配的?

    串口是串行接口 xff08 serial port xff09 的简称 xff0c 也称为串行通信接口或COM接口 串口通信是指采用串行通信协议 xff08 serial communication xff09 在一条信号线上将数据一个比特
  • Linux 下char转换为wchar_t(窄字符转换位宽字符)

    LInux下使用mbstowcs函数可以将char转化为wchar t 函数含义 xff1a convert a multibyte string to a wide char string 说明 xff1a The behaviour o
  • Linux服务器 安装Pytorch GPU版本

    实验室服务器重做系统之后 xff0c 之间搭建的Python环境已甚嚣尘上 xff0c 只好从头再来 但是过程中遇到很多莫名其妙的bug xff0c 特此立章记录 xff0c 望对他人有所帮助 作为一个深度学习的初学者 xff0c 个人对所
  • 鼠标悬停效果 PPT制作

    鼠标悬停效果实现 在制作PPT时 xff0c 有时候需要实现鼠标的悬停效果 xff0c 即将鼠标放置在某个按钮或图片上 xff0c 实现动态变化的效果 目标是 xff1a 当鼠标悬停在一些人物名字上时 xff0c 出现该人物的个人信息 具体
  • 谷歌学术——下载论文

    一些同学在找论文的时候 xff0c 在学校数据库找不到 xff0c 因此可以使用谷歌学术来找 但是国内被墙了 xff0c 无法访问 xff0c 所以可以使用镜像服务器 首先进入谷歌镜像 xff1a 镜像网站 xff08 https ac s
  • Ubuntu 22.04 安装vm-tools

    安装过程一路心酸 xff0c 大家慎重 在Vmware中新建虚拟机之后 xff0c 发现没有办法传输文件和进行随窗口的视图变化 xff0c 打算安装vm tools 但是在Ubuntu 22 04 中 xff0c 如果使用Vmware自带的
  • LD文件 详解

    ld 组合了许多对象文件和归档文件 xff0c 重新定位它们的数据并绑定符号引用 通常编译程序的最后一步是运行 ld 每个可加载或可分配的输出节都有两个地址 第一个是 VMA xff0c 即虚拟内存地址 这是运行输出文件时该节所拥有的地址
  • 【Linux0.11 源码历险记 2】《保护模式》

    继续跟着stup s 来看 xff1a lidt idt 48 load idt with 0 0 lgdt gdt 48 load gdt with whatever appropriate idt 48 word 0 idt limit
  • 【Linux0.11 源码历险记 3】《开启分页》

    下面我们就正式进入head s 的代码 xff1a text globl idt gdt pg dir tmp floppy area pg dir startup 32 movl 0x10 eax mov ax ds mov ax es

随机推荐

  • HttpClient使用HttpGet进行json数据传输

    JSON字符串需要用urlencoding编码对绝大多数HTTP client而言 xff0c URL长度都有上限 xff0c 所以不能传太大的JSON xff0c 一般而言几K应该没问题 xff0c 但是再长点就不好说了 import j
  • 【Linux 内核技术】RCU

    在阅读linux 3 10版本的socket 一节源码时 xff0c 遇到了一个 span class token function rcu dereference span span class token punctuation spa
  • 选择题改错

    一 单选 1 2 以下程序的运行结果是 xff08 xff09 int main void printf 34 s 5 3s n 34 34 computer 34 34 computer 34 return 0 A A computer
  • 安装程序的安装界面为乱码的问题

    有的时候程序的安装界面为乱码 xff0c 多出在msi程序中 xff0c 这其实是AppLocale的bug导致的 xff0c 解决的办法不用删除AppLocale xff0c 只需要到c windows AppPatch下 xff0c 删
  • 周星馳 電影經典對白

    周星馳 電影經典對白 http www jd bbs com viewthread php tid 61 1209979 amp extra 61 page 3D1 1 曾經有一份真誠的愛擺在我的面前 xff0c 但是我沒有珍惜 xff0c
  • Eclipse环境搭建

    Eclipse 环境搭建 C 43 43 还没有写完 xff5e xff5e xff5e xff5e 最近 xff0c 在作一个项目 xff0c 要求所有的软件 xff0c 包括操作系统 开发工具 等 xff0c 所有的软件都要使用正版的
  • 为什么要学习python

    时隔多年以后 xff0c 我又回归CSDN了 xff0c 回来学习学习 刚开始工作的时候 xff0c 在CSDN这里找各种资源 xff0c 各种学习 xff0c 请教 xff0c 等等 xff0c 确实学到了不少 也许是因为自己是做嵌入式开
  • 汇编

    hu bi n 1 动词 xff0c 把资料或文章等编辑在一起 2 名词 xff0c 编辑在一起的资料 xff0c 文献 汇编简介 汇编语言 Assembly Language 是面向机器的程序设计语言 汇编语言中 xff0c 用助记符 M
  • 杨石头智立方47:你我都必须学习的十大管理原则

    http blog sina com cn s blog 4ce6ecc60100fy5v html tj 61 1 一 素养 蓝斯登原则 xff1a 在你往上爬的时候 xff0c 一定要保持梯子的整洁 xff0c 否则你下来时可能会滑倒
  • Media change: lase insert the disc labled

    在Debian中使用apt get安装软件包时经常会提示让你插入netinst的光盘 xff1a Media change please insert the disc labeled 当没有时就无法进行安装了 xff0c 这时可以打开文件
  • Source Insight使用教程

    作为一个开放源代码的操作系统 xff0c Linux 附带的源代码库使得广大爱好者有了一个广泛学习 深入钻研的机会 xff0c 特别是Linux 内核的组织极为复杂 xff0c 同时 xff0c 又不能像windows 平台的程序一样 xf
  • 注册表ShellIconOverlayIdentifiers中没有svn相关的选项

    此问题最初是由于svn不显示Icon入手排查的 打开注册表 HKEY LOCAL MACHINE SOFTWARE Microsoft Windows CurrentVersion Explorer ShellIconOverlayIden
  • CreateProcess注入方法

    采用 CreateProcess 的方法 xff0c 实现起来比较复杂 xff0c 但没有上面几种方法的局限性 且可以用其他工 具 xff08 VC 等 xff09 调试注入的 DLL 下面进行介绍 原理如下 xff1a 1 xff0e 用
  • U盘防毒最强方案(创建删不掉的autorun.inf文件夹)

    病毒 xff0c 每个人都深受其害 xff0c 痛恨不已 xff0c 特别是现在移动设备MP3 MP4 手机 U盘 移动硬盘飞速发展的时代 xff0c 病毒也随着这些移动设备和网络快速蔓延和滋生 xff0c 所以如何防止病毒入侵到自己的爱机
  • Windows 7桌面显示图标窗口类名称

    Windows 7下 xff0c 我们取桌面图标窗口的句柄使用以下语句 在windows XP时代 xff0c 我们获取桌面图标窗口的句柄往往用一下语句 xff1a lt pre gt lt pre name 61 34 code 34 c
  • EnumThreadWindows枚举线程的所有窗口

    BOOL CALLBACK EnumThreadWndProc HWND hwnd LPARAM lParam std list lt HWND gt plist 61 std list lt HWND gt lParam plist gt
  • MFC窗口创建、销毁消息流程

    Windows 消息处理机制 MFC 应用程序中处理消息的顺序 1 AfxWndProc 该函数负责接收消息 xff0c 找到消息所属的 CWnd 对象 xff0c 然后调用 AfxCallWndProc 2 AfxCallWndProc
  • 数字螺旋方阵C++实现

    include lt iostream h gt include lt stdio h gt void main int k h i j n int sum 61 0 int q 61 1 while 1 k 61 h 61 i 61 j
  • 过桥问题动画显示(多线程,简陋版)

    Code include lt windows h gt include lt iostream h gt include lt stdio h gt void gotoxy int x int y COORD c c X 61 x c Y
  • 【大三操作系统实验】 请求页式管理中的置换算法

    xff08 1 xff09 FIFO算法总是选择在内存驻留时间最长的一页将其淘汰 FIFO算法认为调入内存的页不再被可能性要比其他页大 xff0c 因而选择最先调入内存的页换出 xff08 2 xff09 LRU算法基本思想 xff1a 当