左悅 林寧

摘? 要:為了滿足編程題在線評閱對響應時間、并發處理能力的需求,本文結合Linux操作系統的穩定性好、多任務和多用戶等特點,提出在Linux操作系統下架設在線評閱服務器的方法。本文就在線評閱服務平臺的技術進行了探討,給出了評閱服務器的技術性指標、自啟動評閱服務進程的方法、service服務進程對Mysql數據庫操作和多進程并發評閱的具體實現方法等,文中提出的技術使得評閱服務器具有良好的穩定性和較強并發處理能力。
關鍵詞:Linux系統;編程題;在線評閱;并發處理能力
中圖分類號:TP311.1? ? ? ?文獻標識碼:A 文章編號:2096-4706(2019)10-0097-03
Abstract:In order to meet the demand of response time and concurrent processing ability for programming online review,combining the advantages of Linux operating system,such as good stability,multi-task and multi-user,this paper proposes to set up on-line review server under Linux operating system. This paper discusses the technology of the online review service platform,and gives the technical index of the evaluation server,the method of self-starting the review service process,the concrete realization of the operation of the Mysql database by the service process and the concurrent evaluation of the multi-process and so on. The technology proposed in this paper makes the evaluation server have good stability and strong concurrent processing ability.
Keywords:Linux system;programming questions;online judging;concurrent processing capability
0? 引? 言
Linux是一個開源的、多任務、多用戶操作系統,大多數企業或個人選擇在Linux操作系統上搭建FTP服務器、DHCP服務器和Web網站服務器等。Linux操作系統被選作服務器的主要原因有這幾個方面:第一,Linux系統具有較好的穩定性,安裝在Linux的服務器可以連續運行,無須關閉服務器;第二,Linux系統可以使大量用戶在同一服務器上工作而不會出現任何問題;第三,Linux操作系統的代碼是開源的,對于其他操作系統,代碼并非每個人都可以自由使用;第四,Linux服務器還可以執行多任務,即Linux系統能夠處理同時運行的許多不同程序。
本文所開發的平臺要求具有實時在線評閱功能,為了提高在線評閱的響應速度,要求服務端具有多用戶、多進程并發處理學生提交的程序的能力,因此,Linux操作系統非常適合用來搭建在線評閱平臺。
1? 運行環境的需求
1.1? 服務端需求
評閱平臺采用B/S和C/S混合模式進行開發。……