OS(Operating System) Programming in C# [closed] - c#

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I know this project.The question is that "Can we create a real OS with Managed Code or the os that will create with this project is a hello world os?"
Operating Systems need to have full control on hardware.Can we do it with this one?
If there are any another project please tell me
Cosmos Project

Yes it can be done - see Singularity which is (was) a Microsoft research project to create an entirely managed operating system in "Sing#" (an extended version of "Spec#" which is itself an extension of C#). Its worth stressing that this was just a research project into the concept, and was never intended as a "full" operating system of the likes of Windows or Max OSX.
The source code is available on CodePlex - you can download the code, build it and run it yourself in an emulator (I've done it myself, its well documented and relativley easy although I can't remember the exact steps myself).
Parts of the system were written in assembly / C, specifically the bootloader and the lowest level x86 interupt dispatch code however this is essentially all but unavoidable (it is by its very nature very platform dependant - something needs to write the x86 instructions to control and respond to basic hardware). The low level interrupts are also not particularly interesting in terms of how the operating system actually functions, so I personally don't consider this as cheating the "entirely managed" definition.
Looking on the Wikipedia page for Singularity there are also 5-6 similar projects, including Cosmos and a couple of similar attempts that use Java instead of C#.
The focus of Singularity OS was on security and dependency, however whats also impressive is that according to some basic benchmarks in An Overview of the Singularity Project1 (PDF) the performance of their archetecture was actually comparable to that of other "more conventional" operating systems:
... these numbers demonstrate that architecture that we
proposed not only does not incur a performance penalty, but is often as fast as or faster than more
conventional architecture. In other words, it is a practical basis on which to build a system.

Related

What is a native client? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
What is a native client?
Is Native client same as thick client?
Can anybody explaing it for me?
Native client for me traditionally means not interpreted by a virtual execution environment or sandbox but executed by the CPU and bound to the operating system (think Win32). I'd contrast native with HTML, JVM, CLR, etc.
Thick client for me traditionally means some business logic executing on the client, (think WPF, WinForms) as opposed to web/browser or other lightweight presentation container where most business logic is executing on the (web) server and minimal logic is executing on the client.
Traditionally, the two distinctions are unrelated, with "native clients" often being "thick". However, with the introduction of devices this distinction has become skewed, since it's not crystal clear anymore if a native app on a little device can still be considered thick. Many people avoid saying "thick" and refer to "rich" instead.
Nishakant, since you asked this in context of my tweet, let me explain what i meant by it. Native in that context meant a native Windows 8 application, which in turn means an application conforming to the new modern UI guidelines, runs on WinRT and is downloaded and installed from Windows 8 Store and runs locally on the Windows 8 machine. It isn't a web application, but locally installed. You could co-relate it to thick client applications in regular desktop world.
Additionally, this particular application is built by Twitter itself and hence another subtle meaning to the word native
While a native client may be about anything (for example a Native American paying you to write software for him), I'd say that in terms of software, a native client is some piece of software that is compiled to CPU bytecode, as opposed to a piece of software that's compiled to bytecode, which is compiled to CPU bytecode by an execution environment (Java, .NET, etc.) when run.
I'm pretty sure that at present, the term Native Client is only used to refer to Google Native Client (NaCl), which is a tool for running native code from within a browser, and yes in this case, Google definitely can explain it to you.
I can only guess since there is lack of context. I guess the Native Client you refered, is related to Google Chromium, is that right?
Chromium is an OS base on web browser, which means developer should NOT be able to go deeper than the browser. No directly manipulating the hardware, or optimizing your code in a CPU level, things like that.
However the requirement is there, so the Native Client is a technology, which provides a sandbox, to run the Native code(not really native, just you wrote with typical native language) inside the web browser.
You can see it's not same as Thick client.

How Do REPL Interpreters For Compiled Languages Work? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I cant even begin to understand how they work, its a very broad question i guess. How is it possible that one could take a language such as C# which is compiled to IL for the CLR, then further JIT compiled into machine code at run time, and write an Interpreter or REPL for it as implemented in the mono project. How did they get that right?
What is the issue? Machine code is just some data (laying in virtual memory pages which are executable). You can produce that data, then, since it is also code, run it.
You can produce machine code in memory in various ways. For example, you could use LLVM or libjit or many other libraries (or even make your own).
Some implementations of some langauges (I was thinking of the SBCL implementation of Common Lisp) are even able to translate to machine code every line you are interactively typing. And this is not new, some 1957 computers did it (e.g. the French CAB500 for PAF).
You can even generate some source code (e.g. in C), fork a compilation process, then dynamically load that code, e.g. with dlopen(3). Current compilers and processors are fast enough to make that compatible with delays for user-friendly interaction. My MELT domain specific language (to extend GCC) does that successfully.
AS commented by millimoose, Mono is free software, so you can study its code.
The equivalence of code and data is a fundamental property of computers. Likewise the equivalence of numbers and demonstrations in a fundamental insight of Gödel and Turing (and when you hear your favorite MP3 music, you use that too).

.Net Web Application Redesign - Recommendations? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
My employer has a 9 year old proprietary .Net Web Application that needs redesigned. Its creation was originally outsourced to another company and its architecture and coding were done very poorly. It was designed in ASP.net 1.14, VB.Net, and C#. We continued building on the poor architecture, improving when and where possible. We have upgraded to ASP.Net 4.0 and VS 2010.
The system is only used internally and nearly all business processes and workflows are handled through the system for about 140 users. However, the system has grown so big it has become difficult to maintain and its architecture makes it difficult include new functionality in line with the latest technology.
If you could design a .Net system from scratch, keeping mobile technology and Windows 8 in mind, how would you do it? Our SQL 2008 database is sound and we do not intend to change anything there.
.Net Webforms or MVC?
What architecture would you use? Examples? We would need to allow for a customizable business logic layer in the event that an external company with different business rules uses the system.
Any recommended books on designing from the ground floor up?
Other considerations?
This will be a limited answer, but based on my experience I would say the following... If you're going for a rewrite:
Use MVC 4x.
Web Forms are outdated now. If you look at their original purpose you will notice that they were built with existing windows forms developers in mind (button events etc.).
MVC is more of an evolution of target audience, because web developers have matured to the degree where they realise how important standards are and hence require an environment that will allow them to produce the kind of results modern platforms require. It is also far stronger in the separation of concerns arena with things like unit testing.
For the business layer I would seriously consider Web Services, or in your case WCF. This will allow you to deal with a varied number of situations in the future including business to business scenarios where other companies might want to integrate directly with your internal system.
Other Advice?
We've been involved with quite a few systems over the years where we've adopted someone else's system. Whether badly written/designed, or just outdated, starting from scratch is always difficult and you should pay serious attention to the following:
Budget - How much is the company really prepared to fork out
User Temperament: If you are working with users who don't like change, then this is an area where you should pay special attention. Get them involved in the process so that they feel that the outcome was as much their doing as yours.
Be careful of loss of functionality. Because of time/money constraints you may redevelop something but end up not having the time or money to implement what you considered a minor feature. On deployment your users become agitated because it was in fact a pretty serious piece of functionality. The net result is that they start to loose confidence in the system and you'll pay dearly for that.
Processes: If you can consider Agile as a development strategy. It doesn't lend itself well to smaller projects, but does make a big difference in bigger long terms projects if implemented correctly.
Skills/Resources: Be sure that your team are utilized affectively and have the right skills for the right job.
Wow I could say so much more, but it would take a day or two.
Hope that helps a small amount.
Regards,
Jacques

What would be the best technology to use for cross-platform GUI development? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am wanting to start a new (open source) project, and I wish for it to be cross-platform on Windows and Mac OS X (Linux would be good, too!)
I am open for developing seperate front-ends for each platform, but the core logic should be shared.
I would need the following:
Preferably a native GUI widgetset
FTP connection (platform-independant wrappers)
A TreeListView (again, preferably a platform-independant wrapper)
I have been researching this for quite awhile now, and I find these solutions quite attractive:
Mono, using WinForms for Windows, and MonoMac for OS X
Lazarus (FreePascal) with LCL
Mono pros:
Uses C#, a very nice language to work with
Has widgetsets for OS X and Windows
Mono cons:
Mono Framework is a dependency for my application
Lazarus with FPC pros:
Pascal is a great language too, and I know how to work with the Indy controls for FTP.
Has VirtualTreeview, which is the best treelistview control I have ever seen!
Cross-compilation is possible
Also has widgetsets for Windows and OS X
No framework dependencies!
Lazarus with FPC cons:
It appears the support is dying, but maybe thats just me.
VirtualTreeview appears to only have ports for Windows.
Executables can get quite large, but that can be fixed.
I also looked into Delphi XE2 with FireMonkey, but it does not use native controls, and it does not look native, due to the anti-aliasing. :(
Now, my biggest concern is, that I cant seem to find a TreeListView that works for Windows and OS X! I really need a treeview with columns.
The big points go to the technology that has a cross-platform TreeListView that works and is still supported.
Thank you for your time!
I would strongly suggest against Pascal.
It is a dying language, and as you noticed support will diminish with time.
The chance of asking a question and getting an answer is much better with more modern languages.
.NET/Mono is one good option.
.NET has TreeView in WPF, but it's not implemented in Mono, and as far as I know, it never will be.
Another option I'd suggest checking out is Java (Or even better - other JVM based languages such as Scala).
It's very cross-platform(Maybe the most cross-platform language), support is good and language is still evolving (Although it was stuck for a few years), and the syntax+code style is very similar to C#(excluding support for LINQ, etc.), which makes moving from one to another pretty straightforward.
JVM is a prerequisite, but it's not really big problem, as it's already installed on most machines.
Years ago, I used Qt and wxWindows/wxWidgets for single-codebase UI for Windows and various *NIX variants.
Frankly, I haven't worked with them in years, nor I'm aware of how well they support Mac OS X, but they might be worth a look if you are willing to use C++ (they are both C++ libraries).

How to write another Debugger for .NET using CLR [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to implement another debugger (language) for .NET (it's just for academic reason, so that it can implement just a part of a language). I myself like to implement NS2 (network Simlator 2) script for .NET in which anybody can write ns2 script and debug it with .NET
I read this article in stackoverflow and it is far from what I'm looking for.
Here is the requirement
have some predefined keywords (e.g: for, while, if ...)
check the correct form of the statements (e.g: for(start;end;counter){commands} ...)
diffferent colour for different types of statements
ability to add to any IDE (e.g: implementatin like add-in or as a dll or ...(I have no idea))
many other thing that is not necessary for now
How can I do this?
Update : I'm not sure that you got my point, take a look at this, it is very close to what I am looking for.
It will not be an easy task. However: The Dragon Book is probably a good place to start (assuming you've got sufficient computer science background for a compiler theory book to make much sense to you). Compiler Construction: Principles and Practice is also a good text.
You'll want to compile to CIL (common intermediary language). This handy wiki article outlines the CIL instruction set. Debugging your intermediate code against the CLR... well, that's where the StackOverflow article you've linked will come in handy =)
That'll cover your first two bullets (and consume a big chunk of your life).
The next two are different issues, but the easiest way to 'make it go' would probably be to define a syntax for an existing text editor, and set up a macro in the program to call your compiler. I'd recommend TextPad, though I'm sure opinions on a configurable general-purpose text editor will vary among the community ;)
Designing a full IDE with all of the features you've come to know and love in your environment could be quite a task ... or you could try to build an eclipse plugin. Personally (assuming you can design your language and learn something from it), I'd just stick with syntax highlighting in TextPad.
There is more and more interest in this area and in fact there is an active project by Microsoft Research that is looking at this on building a common infrastructure to build compiler (and debugger) for custom languages targetting .NET
http://cciast.codeplex.com/
I have used the infrastructure myself but not an expert in compiler technology. Hope this gives you a good starting point and you may find the discussion forum useful to share idea with like minded people.

Categories