# This is the CMakeCache file.
# For build in directory: d:/untitledOS/cmake-build-debug
# It was generated by CMake: D:/Program Files/JetBrains/CLion 2021.2.2/bin/cmake/win/bin/cmake.exe
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the editor.
# If you do want to change a value, simply edit, save, and exit the editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.
########################
# EXTERNAL cache entries
########################
//Path to a program.
CMAKE_ADDR2LINE:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/addr2line.exe
//Path to a program.
CMAKE_AR:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/ar.exe
//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=Debug
//Id string of the compiler for the CodeBlocks IDE. Automatically
// detected when left empty
CMAKE_CODEBLOCKS_COMPILER_ID:STRING=
//The CodeBlocks executable
CMAKE_CODEBLOCKS_EXECUTABLE:FILEPATH=CMAKE_CODEBLOCKS_EXECUTABLE-NOTFOUND
//Additional command line arguments when CodeBlocks invokes make.
// Enter e.g. -j<some_number> to get parallel builds
CMAKE_CODEBLOCKS_MAKE_ARGUMENTS:STRING=
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/g++.exe
//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_AR:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc-ar.exe
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc-ranlib.exe
//Flags used by the CXX compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the CXX compiler during DEBUG builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the CXX compiler during RELEASE builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Libraries linked by default with all C++ applications.
CMAKE_CXX_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
//C compiler
CMAKE_C_COMPILER:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe
//A wrapper around 'ar' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_AR:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc-ar.exe
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
// for the GCC compiler
CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc-ranlib.exe
//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Libraries linked by default with all C applications.
CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
//No help, variable specified on the command line.
CMAKE_DEPENDS_USE_COMPILER:UNINITIALIZED=FALSE
//Path to a program.
CMAKE_DLLTOOL:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/dlltool.exe
//Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Convert GNU import libraries to MS format (requires Visual Studio)
CMAKE_GNUtoMS:BOOL=OFF
//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/untitledOS
//Path to a program.
CMAKE_LINKER:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/ld.exe
//make program
CMAKE_MAKE_PROGRAM:FILEPATH=C:/PROGRA~1/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/mingw32-make.exe
//Flags used by the linker during the creation of modules during
// all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_NM:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/nm.exe
//Path to a program.
CMAKE_OBJCOPY:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/objcopy.exe
//Path to a program.
CMAKE_OBJDUMP:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/objdump.exe
//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=untitledOS
//Path to a program.
CMAKE_RANLIB:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/ranlib.exe
//RC compiler
CMAKE_RC_COMPILER:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/windres.exe
//Flags for Windows Resource Compiler during all build types.
CMAKE_RC_FLAGS:STRING=
//Flags for Windows Resource Compiler during DEBUG builds.
CMAKE_RC_FLAGS_DEBUG:STRING=
//Flags for Windows Resource Compiler during MINSIZEREL builds.
CMAKE_RC_FLAGS_MINSIZEREL:STRING=
//Flags for Windows Resource Compiler during RELEASE builds.
CMAKE_RC_FLAGS_RELEASE:STRING=
//Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_READELF:FILEPATH=C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/readelf.exe
//Flags used by the linker during the creation of shared libraries
// during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of sha
使用C++语言编写的操作系统课程设计
需积分: 0 46 浏览量
更新于2022-12-28
收藏 151KB ZIP 举报
操作系统是计算机科学的基础,它是控制和管理计算机硬件与软件资源的核心程序。在本课程设计中,我们将使用C++这一强大的编程语言来实现一个基础的操作系统,着重关注进程管理这一核心功能。C++语言因其高效、灵活和面向对象的特性,常被用于操作系统开发。
我们要理解操作系统中的“进程”概念。进程是程序执行时的一个实例,包含程序代码、数据、内存空间以及进程控制块(PCB)。在操作系统中,进程管理主要涉及以下几个方面:
1. **进程创建**:当用户启动一个程序时,操作系统会为它分配必要的资源并创建一个进程。在C++中,我们可以使用内存管理函数如`new`来动态分配内存,模拟进程的创建过程。
2. **进程撤销**:当进程执行完毕或因某种原因需要终止时,操作系统需要释放其占用的资源。在我们的设计中,这将涉及清理内存、关闭文件等操作。
3. **进程状态转换**:进程有三种基本状态:就绪、运行和阻塞。进程在运行过程中会经历这些状态的转换,例如,当一个正在运行的进程被中断时,它可能会变为就绪状态。我们需要实现机制来跟踪和管理这些状态。
4. **进程调度**:操作系统需要决定哪个进程应该获取CPU执行权。常见的调度算法有先来先服务(FCFS)、短作业优先(SJF)、时间片轮转等。在C++中,我们可以使用队列和优先级队列等数据结构来实现这些算法。
5. **进程同步与通信**:多个进程之间可能存在合作或竞争关系,需要同步机制(如信号量)来避免竞态条件,或者通过消息传递进行通信。C++的互斥锁(mutex)、条件变量(condition variable)和共享内存可以用来实现这些功能。
6. **死锁预防与检测**:死锁是指两个或多个进程相互等待对方释放资源而无法继续执行的情况。我们需要设计策略来预防或检测死锁,例如银行家算法。
7. **线程管理**:现代操作系统常常支持多线程,线程是进程内的轻量级子任务。线程间的切换比进程更快速,但同样需要管理资源和同步问题。C++11引入了标准库中的`<thread>`,提供线程创建、同步等功能。
8. **内存管理**:操作系统负责内存的分配与回收,包括虚拟内存管理和页面替换算法。C++的智能指针(如`std::unique_ptr`和`std::shared_ptr`)可以帮助我们实现自动内存管理。
9. **I/O管理**:操作系统处理设备输入输出,通常使用缓冲区和异步I/O来提高效率。C++的文件流库(`<fstream>`)和异步I/O库(`<future>`)可帮助我们实现这一功能。
在“untitledOS”这个项目中,你将有机会深入理解并实践上述知识点,通过编写C++代码实现操作系统的核心功能。这是一个挑战性的任务,但完成后,你将对操作系统的工作原理有更深刻的理解,并提升你的系统编程能力。在实践中,你不仅需要掌握C++语言,还要学习操作系统原理和设计模式,这对你的IT职业生涯将大有裨益。
zs脑瓜空空
- 粉丝: 0
- 资源: 5
最新资源
- springboot253社区养老服务系统.zip
- springboot055服装生产管理的设计与实现.zip
- springboot254小区团购管理.zip
- springboot253社区养老服务系统_0303174040.zip
- springboot057洗衣店订单管理系统.zip
- springboot254小区团购管理_0303174040.zip
- springboot056教学资源库.zip
- springboot058美发门店管理系统.zip
- Agile Controller-Campus V300R001C10SPC001T 软件安装指南
- C++大学生课设作业-基于MFC的图形编辑系统.zip
- matlab程序:含冰蓄冷装置的冷电联供型微网经济优化运行 摘要:针对冷电联供型微网的运行成本优化,引入冰蓄冷储能系统,建立了含光伏、风电、微型燃气轮机、电储能和冰蓄冷等可再生能源和常规能源以及冷电储
- 基于逻辑回归的银行客户流失预测研究(数据集,代码,报告)
- matlab代码:多微网、多energy hub、多能源互联系统协同优化 摘要:建立了一个基于交互控制的双层两阶段框架,以实现互联多能源系统间的最优能源供应 在下层,每个MES通过求解一个成本最小化
- matlab代码:基于博弈与需求响应模型的光伏用户群的电能共享方法 摘要:为了使光伏用户群内各经济主体能实现有序的电能交易,提出了一种基于光伏电能供需比(SDR)的内部价格模型 在考虑经济性和舒适度
- 全志Linux Tina-SDK开发完全手册
- 基于单片机酒精检测报警器单片机防酒驾 有AD0809和AD0832两个版本 1.能设置上下限报警值 2.超过设置值声光报警 3.LCD1602液晶屏显示 4.按键设置上下限报警值