Computer Engineering and Applications ›› 2011, Vol. 47 ›› Issue (4): 68-71.DOI: 10.3778/j.issn.1002-8331.2011.04.019

• 研发、设计、测试 • Previous Articles     Next Articles

Source code online judge system technological improvements

ZENG Zonggen   

  1. Department of Electronic Information Engineering,Ningbo Polytechnic,Ningbo,Zhejiang 315800,China
  • Received:2010-08-12 Revised:2010-10-25 Online:2011-02-01 Published:2011-02-01
  • Contact: ZENG Zonggen

源程序在线评测系统技术改进

曾棕根   

  1. 宁波职业技术学院 电子信息工程系,浙江 宁波 315800
  • 通讯作者: 曾棕根

Abstract: To address current online judge’s shortcomings of rough design and unscientific feedback data,applying black box testing principles,using LAMP platform,proc file system,ptrace debugging and advanced pipe operation,it develops a better online judge:Minimum time limit is up to 1 ms,the limitation of RSS is realized,minimum limit of the amount of output data is up to 1 byte;it solves six issues:Input and output redirection,running time limit,memory usage limit,obtaining the user program running time and memory usage,output data size limit and advanced pipe operating to avoid frequent disk access,it provides a key technical reference of programming software development.

Key words: online judge, black box testing, proc file system, ptrace debugging, advanced pipe operation

摘要: 针对当前源程序在线评测系统设计粗糙和反馈数据不够科学的缺点,应用黑盒测试原理,采用LAMP平台,使用Linux操作系统实时读取内核数据的proc文件系统、ptrace进程跟踪和高级管道操作,研制了更完善的源程序在线评测系统:程序运行时间最小限制可达1毫秒,实现了对RSS驻留内存的限制,程序输出数据量最小限制可达1字节。在输入输出错误输出重定向、限制运行时间、限制内存用量、获取用户程序的运行时间和内存用量、程序输出数据大小限制和高级管道操作避免频繁访问磁盘等六方面进行了技术改进,为程序设计类辅助教学软件的开发提供了关键技术参考。

关键词: 源程序在线评测, 黑盒测试, proc文件系统, ptrace调试, 高级管道操作

CLC Number: