C#格式的SJF算法 [英] SJF Algorithm in C# form

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

问题描述

大家好,
有一种用于操作系统的算法,您可以将其发布有关c#的所有代码吗?它非常复杂,但是您能解释一下我如何编写代码来在c#中运行多个进程吗?

Hi everyone,
There is an algorithm that is used for operating system and can you post it all codes about c#? It''s very complex but can you explain how I can write a code to run many process in c#?

推荐答案

处理或多线程.我认为在C#中,MultiProcessing是不可能的(甚至不是必需的),但是我还没有对此进行深入的研究.多线程是可能且有用的:

John Skeet讨论线程/ [
You need to be careful do you mean multi-processing or multi-threading. I don''t think MultiProcessing is possible (or even that necessary) in C#, but I haven''t investigated that very deeply. Multi-threading is possible and useful:

John Skeet on Threads/[^]

Hope that answers your question.


您应该真正尝试使用google.我做到了,并获得了将近58,000个结果:

[
You should really try google. I did, and got back almost 58,000 results:

search phrase = "sjf algorithm"[^]


我为SJF抢占式算法写代码吗?我在C#中做了sjf非抢占式的代码,但这是解决代码中抢占式sjf的非常复杂的算法:/

例如:
流程/到达时间/突发时间/优先级
p1 0 8 0
p2 1 4 1
p3 2 1 2

在此示例中,c#的平均时间,周转时间和总吞吐量有多好??
how can i write for sjf preemptive algorithm so? i did sjf non-preemptive in c# but this very complex algoritm to solve preemptive sjf for code :/

for example :
processes / arrival time / burst time / priority
p1 0 8 0
p2 1 4 1
p3 2 1 2

how fine averate time , turnaround time and throught in this example by c# ??


这篇关于C#格式的SJF算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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