首页 \ 问答 \ 8086多处理是否有任何标准?(Is there any kind of standard for 8086 multiprocessing?)

8086多处理是否有任何标准?(Is there any kind of standard for 8086 multiprocessing?)

回到我制作8086仿真器时,我注意到在多处理器环境中有用于同步的LOCK前缀。 然而,我知道x86拱门的唯一多任务处理。 涉及使用API​​C,直到Pentiums或486s都没有出现。

8086多任务处理是否有任何标准,还是由指令集和/或特殊端口的某些制造商特定扩展来完成?

按照标准,我的意思是:如果它们都使用相同的内存,你如何分开2个处理器? 如果没有某种方法使每个处理器执行不同的代码,这是不可能的。 (或仅在一个处理器上造成中断)


Back when I made an 8086 emulator I noticed that there was the LOCK prefix intended for synchonization in a multiprocessor environment. Yet the only multitasking I know of for the x86 arch. involves use of the APIC which didn't come around until either the Pentiums or 486s.

Was there any kind of standard for 8086 multitasking or was it done by some manufacturer specific extensions to the instruction set and/or special ports?

By standard, I mean things like: How do you separate the 2 processors if they both use the same memory? This is impossible without some kind of way to make each processor execute a different piece of code. (or cause an interrupt on only one processor)


原文:https://stackoverflow.com/questions/2778278
更新时间:2022-06-07 08:06

最满意答案

以下代码现在编译并具有“newEvent”所需的类型签名

module FRP.Sodium where

import Prelude
import Control.Monad.Free
import Data.Coyoneda
import Data.Tuple

data ReactiveF more
  = RFNewEvent (NewEventData -> more)

type Reactive a = FreeC ReactiveF a

data NewEventData = NewEventData forall a. Tuple (Event a) (a -> Reactive Unit)

data Event a
  = ENever
  | EMerge (Event a) (Event a)
  | EFilterJust (Event (Maybe a))
  | ECoalesce (a -> a -> a) (Event a)
  | EOnce (Event a)
  | ESplit (Event (Array a))
  | EVar Int

data Behaviour a = BVar Int

extractNewEventData :: forall a. NewEventData -> (Tuple (Event a) (a -> Reactive Unit))
extractNewEventData (NewEventData x) = x

newEvent :: forall a. Reactive (Tuple (Event a) (a -> Reactive Unit))
newEvent = map extractNewEventData $ liftFC $ RFNewEvent id

编辑

还尝试了purescript-exists。 使定义“样本”成为可能

RFSample被添加到ReactiveF ...

.
.
.
data ReactiveF more
  = RFNewEvent (NewEventData -> more)
  | RFSample (SampleData more)
.
.
.
data SampleDataF more a = SampleDataF (Behaviour a) (a -> more)
type SampleData more = Exists (SampleDataF more)

sample :: forall a. Behaviour a -> Reactive a
sample beh = liftFC $ RFSample $ mkExists $ SampleDataF beh id

谢谢Phil Freeman的评论。


The following code now compiles and has the desired type signature for "newEvent"

module FRP.Sodium where

import Prelude
import Control.Monad.Free
import Data.Coyoneda
import Data.Tuple

data ReactiveF more
  = RFNewEvent (NewEventData -> more)

type Reactive a = FreeC ReactiveF a

data NewEventData = NewEventData forall a. Tuple (Event a) (a -> Reactive Unit)

data Event a
  = ENever
  | EMerge (Event a) (Event a)
  | EFilterJust (Event (Maybe a))
  | ECoalesce (a -> a -> a) (Event a)
  | EOnce (Event a)
  | ESplit (Event (Array a))
  | EVar Int

data Behaviour a = BVar Int

extractNewEventData :: forall a. NewEventData -> (Tuple (Event a) (a -> Reactive Unit))
extractNewEventData (NewEventData x) = x

newEvent :: forall a. Reactive (Tuple (Event a) (a -> Reactive Unit))
newEvent = map extractNewEventData $ liftFC $ RFNewEvent id

Edit

Also trying out purescript-exists. Makes it possible to define "sample"

RFSample gets added to ReactiveF ...

.
.
.
data ReactiveF more
  = RFNewEvent (NewEventData -> more)
  | RFSample (SampleData more)
.
.
.
data SampleDataF more a = SampleDataF (Behaviour a) (a -> more)
type SampleData more = Exists (SampleDataF more)

sample :: forall a. Behaviour a -> Reactive a
sample beh = liftFC $ RFSample $ mkExists $ SampleDataF beh id

Thank you Phil Freeman for your comment.

相关问答

更多
  • >>=是一个函数,仅此而已。 它驻留在Prelude模块中,并且具有类型(>>=) :: forall ma b. (Bind m) => ma -> (a -> mb) -> mb (>>=) :: forall ma b. (Bind m) => ma -> (a -> mb) -> mb ,是Bind类型类的bind函数的别名。 您可以在此链接中找到Prelude模块的定义,可在Pursuit包索引中找到 。 这与Haskell中的Monad类型密切相关,它更容易找到资源。 关于这个概念有一个着名的问 ...
  • Purescript 0.12引入了较新版本的Effect和Console库,不幸的是,尚未更新pulp init以更正生成的示例以匹配(请参阅https://github.com/purescript-contrib/pulp/issues/337 ) 只需将Main.purs中的代码更新为: module Main where import Prelude (Unit) import Effect import Effect.Console (log) main :: Effect Unit mai ...
  • 你快到了。 注意这一行: import Control.Monad.Eff.Console (CONSOLE, log) Control.Monad.Eff.Console提供log和logShow 。 为了解决你的特定问题,你只需要用logShow ( ( , CONSOLE ,是Effect的名字)之后的第一个名字替换这些parens之间的log 。 以防万一 - 两者之间的差异可以通过以下类型看出: log :: forall eff. String -> Eff (conso ...
  • Object 类型构造函数由一行类型参数化 。 在类型表示法中, Object有kind # * -> * 。 也就是说,它需要一行类型到一个类型。 ( value :: Number, values :: [Number] )表示一行类型 ( 类型为# *东西),所以它可以传递给Object来构造一个类型,即 Object ( value :: Number, values :: [Number] ) 请注意, { ... }仅仅是Object类型构造函数的语法糖,所以这与之相同 { value :: ...
  • 我认为listens是你正在寻找的功能: https : //pursuit.purescript.org/packages/purescript-transformers/1.0.0/docs/Control.Monad.Writer#v : listens ,如果我理解正确的话你在尝试做什么 如果你对转换值不感兴趣,你可以传入id ,如果你只想获得累积值,那么a <- snd <$> listens id就可以了。 I think listens is the function you're looki ...
  • ST monad是一种很好的方法,但根据您的使用情况,可能有也可能没有标准库函数。 purescript-maps的Data.StrMap模块为具有字符串键的同类记录定义了一个外来类型,因此如果您的值都具有相同的类型,则可以使用Data.StrMap.ST来改变您的记录。 如果没有,您应该可以轻松地定义一个函数来使用ST和FFI更新记录。 棘手的一点是选择正确的类型。 如果您想为特定键执行某些操作,可以编写一个函数 setFoo :: forall r a h eff. STRef h { foo :: a ...
  • 以下代码现在编译并具有“newEvent”所需的类型签名 module FRP.Sodium where import Prelude import Control.Monad.Free import Data.Coyoneda import Data.Tuple data ReactiveF more = RFNewEvent (NewEventData -> more) type Reactive a = FreeC ReactiveF a data NewEventData = NewEv ...
  • 如果您正在使用purescript-aff (v4或更高版本)的最新主要版本,那么Aff的运行时表示已更改,您无法再使用errback / callback函数样式直接创建它。 看看https://pursuit.purescript.org/packages/purescript-aff/4.0.2/docs/Control.Monad.Aff.Compat模块,特别是EffFnAff类型/ fromEffFnAff函数,以解释如何等价的东西现在有效。 或者你也可以使用makeAff构建Aff ,但这需要 ...
  • 您无法解释为特定值,因为解释器是作为自然变换提供的 - forall a. fa -> ga forall a. fa -> ga 。 这里的a不能被正在进行解释的函数“触及”。 您可以解释为Array或State String ,但a将始终由您正在解释的结构决定。 如果你知道你只想解释Free MyAlgebra Int -> Array Int那么这一切都会解决。 You can't interpret to a specific value, as interpreters are provided ...
  • 看一下PureScript Prelude源码 ,我会这样说: instance functorFn :: Functor ((->) r) where map = compose -- point-free! 您在http://try.purescript.org/?session=3538ae1c-eece-8f50-ad0c-e1504846a793中的示例: foldr f z Nil = z foldr f z (x:xs) = f x (subfold xs) where subfo ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)