⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 preparing-goal_1.htm

📁 编写自己的操作系统
💻 HTM
📖 第 1 页 / 共 2 页
字号:
face="Times New Roman TUR">5</FONT>个月之后,我突然接手一个压力极大的项目,也退出了小组。半年之后,当公司的项目忙完之后,我试图和他们联系,但邮件都被退回,这个计划最终失败了。尽管我在这个过程中学到了不少东西,但给我印象更加深刻的是,如果一件事情,你不十分清楚你的目标及计划,那么这件事情基本上从一开始就失败了。</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3>对于这个问题,在<FONT 
face="Times New Roman TUR">Internet</FONT>上有一篇广为流传的经典文章,不妨借花献佛,引用于此。</FONT></DIV>
<DIV></BASEFONT></FONT><BASEFONT face="times new roman backslanted" size=2><FONT 
face="times new roman" size=4></FONT></BASEFONT>&nbsp;</DIV><BASEFONT 
face="times new roman backslanted" size=2><FONT face="times new roman" size=4>
<HR>

<DIV></BASEFONT><BASEFONT face="times new roman backslanted" size=2><FONT 
face="times new roman" size=4>
<P class=MsoNormal 
style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; tab-stops: list 21.0pt; mso-list: l5 level1 lfo3"><STRONG><FONT 
face="Times New Roman TUR" size=5>0.1.2 Questions For an OS 
Designer</FONT></STRONG></P></DIV></FONT></BASEFONT><BASEFONT 
face="times new roman backslanted" size=2><I>
<P></P>
<DD><FONT size=3>Here are questions that you should answer before you start to 
code an OS. It's not a secret that every program must be designed before it is 
written (implemented). Also it's not a secret that a very few of programs are 
written this way... Most are written under pressure and hardly have a complete 
requirements list when coding starts. </FONT>
<P></P>
<DD><FONT size=3>Such an approach is very harmful. Design is finished in breaks 
between coding work and is dictated by things that are already written and work. 
Programmers tend to think "I'll change it later" but mostly later never comes. 
Nobody really wants to change already working code to fit a changed design. 
</FONT>
<P></P>
<DD><FONT size=3>It may be very painful if you write an OS. Because of design 
flaws or incomplete design the whole project may be brought down or at best take 
months to redesign and rewrite big parts. </FONT>
<P></P><FONT size=3>
<DD>Answering questions suggested here will not form a full design 
specification. However it will not let coding go completely off road. All of 
them should be answered before writing a line of code. Certain questions may be 
ignored if they are irrelevant, e.g. you don't need to think about file systems 
if you don't plan to support mass storage devices. From the other hand, all the 
answered questions should not contradict. Where I feel necessary, hints are 
typed as italic. </I><BR><BR>
<HR>
</FONT>
<OL>
  <H2>
  <LI><FONT size=4>What is a primary goal of my OS?</FONT></H2>
  <UL>
    <LI><FONT size=3>Is it a standard (low end) desktop system? <I>User is 
    dummy, highest priority for hardware and software compatibility.</I> </FONT>
    <LI><FONT size=3>Is it a high-end desktop system? <I>User is CAD/CAM 
    engineer, highest priority for performance and certain hardware/software 
    compatibility.</I> </FONT>
    <LI><FONT size=3>Is it a real-time oriented system? <I>User is a 
    professional programmer, highest priority for performance, defined response 
    time, easy extendable hardware support and programming control.</I> 
    </FONT></LI></UL>
  <H2>
  <LI><FONT size=4>What platforms my OS is going to support?</FONT></H2>
  <UL>
    <LI><FONT size=3>Will it support multiprocessing? </FONT>
    <LI><FONT size=3>What kind of multiprocessor platforms? Symmetric? <I>(all 
    processors are exactly the same).</I> Asymmetric? <I>(CPUs may be different 
    in architecture and computing power).</I> Both? </FONT>
    <LI><FONT size=3>Will it support only local multiprocessing? <I>(all CPUs 
    are connected through a local bus).</I> Distributed multiprocessing? 
    <I>(CPUs are connected through network-like connection).</I> Both? </FONT>
    <LI><FONT size=3>What is the target hardware system? Desktop? <I>(more or 
    less standard hardware set).</I> Customizable <I>(embedded)</I> hardware? 
    <I>(If the latter is an answer you'll likely have to individually support 
    every even compatible processor).</I> </FONT></LI></UL>
  <H2>
  <LI><FONT size=4>Will it be a multitasking OS?</FONT></H2>
  <UL>
    <LI><FONT size=3>What kind of multitasking will it provide for applications? 
    Cooperative? <I>(tasks yield CPU when they don't need it, demonstrating good 
    will).</I> Preemptive? <I>(tasks are given a defined amount of CPU 
    time).</I> </FONT>
    <LI><FONT size=3>Do I need to protect tasks from each other well? </FONT>
    <LI><FONT size=3>What is a relationship between tasks in terms of living 
    space? Do they share the same address space? Completely separated? Both? 
    </FONT>
    <LI><FONT size=3>How will different tasks communicate with each other? 
    </FONT>
    <LI><FONT size=3>What will be a memory model of space that a task runs in? 
    Should I favor simplicity and speed <I>(memory is cheap)</I> or size 
    <I>(memory is a scarce resource)?</I> </FONT>
    <LI><FONT size=3>Do I need to protect system from application tasks? 
    </FONT></LI></UL>
  <H2>
  <LI><FONT size=4>What file system will my OS use?</FONT></H2>
  <UL>
    <LI><FONT size=3>Should I favor access time (performance) or reduced storage 
    space (size)? </FONT>
    <LI><FONT size=3>Can I use one of already developed and well documented file 
    systems? </FONT>
    <LI><FONT size=3>Can I use a cut down version of one of well-known file 
    systems? </FONT>
    <LI><FONT size=3>What will be an executable format? </FONT></LI></UL>
  <H2>
  <LI><FONT size=4>What build tools do I need?</FONT></H2>
  <UL>
    <LI><FONT size=3>Can I use one of existent compilers and linkers? </FONT>
    <LI><FONT size=3>Can I obtain (for free, buy or lease) source code for 
    compilers and linkers? </FONT>
    <LI><FONT size=3>Do I have to write my own several tools? </FONT>
    <LI><FONT size=3>Do I have to write all tools on my own?<I>This should be by 
    any means avoided.</I> </FONT></LI></UL>
  <H2>
  <LI><FONT size=4>How can I easily support third party soft?</FONT></H2>
  <UL>
    <LI><FONT size=3>Can I support already existent and popular software? 
</FONT>
    <LI><FONT size=3>How can I support easy creating of third party applications 
    for my OS?<I> (Libraries)</I> </FONT>
    <LI><FONT size=3>How can I support easy creating of third party device 
    drivers? </FONT></LI></UL>
  <H2>
  <LI><FONT size=4>How can I use already written code and 
  information?</FONT></H2>
  <UL>
    <LI><FONT size=3>Can I use code that is written by others and works? 
    <I>(Even partially).</I> </FONT>
    <LI><FONT size=3>Where can I get different kinds of information? <I>(Set 
    your own information library).</I> 
</FONT></LI></UL></LI></OL></FONT></BASEFONT></DD></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -