Python OS [英] Python OS

查看:85
本文介绍了Python OS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Python中对操作系统进行原型设计?如果是这样,这个任务需要什么?b $ b? (即如何在
Python中编写启动加载器?)


- Richard B.

解决方案

Richard Blackwood写道:

是否可以用Python原型化操作系统?如果是这样,这样的任务会带来什么? (即如何在Python中编写启动加载器?)



在这个组中有关于这个主题的冗长讨论 - 谷歌

是你的朋友。


一般来说,这是不可能的 - 因为有大量的

低级别的东西需要为中断例程编程类似

无法在python中完成。


-

问候,


Diez B. Roggisch


Diez B. Roggisch写道:

Richard Blackwood写道:
< blockquote class =post_quotes>是否可以用Python原型化操作系统?如果是这样,这样的任务会带来什么? (即如何在Python中编写启动加载器?)

在这个组中有关于这个主题的冗长讨论 - 谷歌
是你的朋友。



我知道,我读过它们。结论是,它确实可以并且事实上已经完成了



一般来说,这是不可能的 - 因为有相当数量的
低对于中断例程等等无法在python中完成的级别的东西。



更多我的意思是我是否可以_prototype_ an Python中的操作系统(即

制作虚拟操作系统)。


PS如果可以在C中编写中断例程,他们可以在Python中执行相同的



>我知道,我读过它们。结论是,它确实可以并且事实上

已经完成。


Hm。我会自己重读它们,看看是否在这个领域取得了什么成果。

但我真的怀疑有人带了一个python翻译并开始写一个操作系统。


我可以想象在python上有一个操作系统_based_,使用python暴露os api

- 但这仍然需要相当多的低级别的东西

不能用python本身完成,但必须用C语言编写,甚至用汇编语言编写。

更多我的意思是我是否可以在Python中使用_prototype_操作系统(即
制作虚拟操作系统)。


P.S.如果可以用C编程中断例程,他们可以用Python做同样的事情。




告诉我如何在python中设置中断跳转表到你的例程并且

如何编写时间关键代码,必须在几百个b $ b cpu-cycles中执行。和GIL一起工作有多好。

-

问候,


Diez B. Roggisch


Is it possible to prototype an operating system in Python? If so, what
would such a task entail? (i.e. How would one write a boot-loader in
Python?)

- Richard B.

解决方案

Richard Blackwood wrote:

Is it possible to prototype an operating system in Python? If so, what
would such a task entail? (i.e. How would one write a boot-loader in
Python?)


There have been lengthy discussions on this subject in this group - google
is your friend.

Generally spaeking, its not possible - as there is a fair amount of
low-level stuff to be progammed for interrupt routines and the like that
can not be done in python.

--
Regards,

Diez B. Roggisch


Diez B. Roggisch wrote:

Richard Blackwood wrote:

Is it possible to prototype an operating system in Python? If so, what
would such a task entail? (i.e. How would one write a boot-loader in
Python?)

There have been lengthy discussions on this subject in this group - google
is your friend.


I know, I read them. The conclusion was that indeed, it can and in fact
has been done.
Generally spaeking, its not possible - as there is a fair amount of
low-level stuff to be progammed for interrupt routines and the like that
can not be done in python.


More what I meant was whether I can _prototype_ an OS in Python (i.e.
make a virtual OS).

P.S. If one can program interrupt routines in C, they can do the same
in Python.


> I know, I read them. The conclusion was that indeed, it can and in fact

has been done.
Hm. I''ll reread them myself and see if what has been achieved in this field.
But I seriously doubt that someone took a python interpreter and started
writing an OS.

I can imagine having an OS _based_ on python, where the os api is exposed
using python - but still this requires a fair amount of lowlevel stuff that
can''t be done in python itself, but must be written in C or even assembler.
More what I meant was whether I can _prototype_ an OS in Python (i.e.
make a virtual OS).
P.S. If one can program interrupt routines in C, they can do the same
in Python.



Show me how you set the interrupt jumptables to your routines in python and
how you write time-critical code which has to be executed in a few hundred
cpu-cycles. And how good that works together with the GIL.
--
Regards,

Diez B. Roggisch


这篇关于Python OS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆