The Furry Forums would like to place cookies on your computer to help us make this website better. To find out more about the cookies, see our privacy notice.
To accept the cookie click here, or please login or register.

Author Topic: What do you know about Operating System development?  (Read 2558 times)

0 Members and 1 Guest are viewing this topic.

Offline Zeman

  • Avid Aardvark
  • *
  • awards This user has been a forum member for over 10 years
  • Posts: 16
  • Gender: Male
    • Steam
    • Awards
  • Species: Husky
  • Coloring: Grey Primary with White Secondary
What do you know about Operating System development?
« on: July 05, 2014, 03:28:58 AM »
I program and develop a video game almost daily, however I have an aspiration to create my ideal OS from the ground up. I know a good amount of C, and I know that I will need at least some basic knowledge of Assembly, but so far the only thing I know about Assembly is that it's an absolute pain to learn lol.

So what is y'all's experience with OS development? Is it even worth the hassle, or is there another way I haven't stumbled upon (other than using the Linux kernel)?

Offline underpilot

  • Vibrating Furby
  • *
  • awards This user has been a forum member for over 10 years
  • Posts: 10
  • Gender: Male
    • Skype
    • Fur Affinity
    • Awards
  • Species: Wolf
  • Coloring: Black
  • Height: 6'
  • Weight: 235lbs
  • Build: A little bit chubby and trying to work it off
Re: What do you know about Operating System development?
« Reply #1 on: July 05, 2014, 03:33:30 AM »
I program and develop a video game almost daily, however I have an aspiration to create my ideal OS from the ground up. I know a good amount of C, and I know that I will need at least some basic knowledge of Assembly, but so far the only thing I know about Assembly is that it's an absolute pain to learn lol.

So what is y'all's experience with OS development? Is it even worth the hassle, or is there another way I haven't stumbled upon (other than using the Linux kernel)?

I can't claim to have any experience with it, personally, but I will say that my rudimentary knowledge of it tells me that you're better off customizing the Linux kernel to your needs. If nothing else, because it has a good majority of the really hard work done for you. Do you really want to sit down and write a driver every time you get a new network card or motherboard? So much overhead on a project like that.

I would say extend the Linux kernel, you can write everything on top of it and focus on customizing the parts that really matter to you, instead of spending all your time debugging a faulty USB interface driver :\
  • Avatar by: starcoolf

Offline saph the sergal

  • Noble Newt
  • ********
  • awards This user has been a forum member for over 10 years This user has made a suggestion for the forum that was approved and implemented This user has donated to the forum more than once. This user has donated to the forum.
  • Posts: 1203
  • Gender: Male
  • a derpy sergal
    • Awards
  • Species: aussie sergal
  • Coloring: black and purple
  • Height: 6 feet
  • Weight: 50 kilograms
  • Build: in shape
  • Currently: hello darkness my old friend
Re: What do you know about Operating System development?
« Reply #2 on: July 05, 2014, 06:11:14 PM »
just use the linux kernel ur own os is hard i have tried to make one for myself couldn't do it at all it would only run on a old motherboard that i have and making a new driver for everything is a pain in the behind
  • Avatar by: xeshaire on fa
on land line is a inanimate object under water it has a life of its own

i have a very dry sense of humor be careful around me :D

Offline Zeman

  • Avid Aardvark
  • *
  • awards This user has been a forum member for over 10 years
  • Posts: 16
  • Gender: Male
    • Steam
    • Awards
  • Species: Husky
  • Coloring: Grey Primary with White Secondary
Re: What do you know about Operating System development?
« Reply #3 on: July 05, 2014, 07:02:57 PM »
Alright I'll look more into using Linux, I forgot about all the drivers, do y'all have any experience with Linux? I only use Ubuntu, but I've never looked at the kernel.

Offline saph the sergal

  • Noble Newt
  • ********
  • awards This user has been a forum member for over 10 years This user has made a suggestion for the forum that was approved and implemented This user has donated to the forum more than once. This user has donated to the forum.
  • Posts: 1203
  • Gender: Male
  • a derpy sergal
    • Awards
  • Species: aussie sergal
  • Coloring: black and purple
  • Height: 6 feet
  • Weight: 50 kilograms
  • Build: in shape
  • Currently: hello darkness my old friend
Re: What do you know about Operating System development?
« Reply #4 on: July 05, 2014, 07:04:18 PM »
never used linux myself but my mate has its a pain in the behind by the looks of it
  • Avatar by: xeshaire on fa
on land line is a inanimate object under water it has a life of its own

i have a very dry sense of humor be careful around me :D

Offline anoni

  • Zoomorphic Zebra
  • **********
  • awards This user has been a forum member for over 10 years Assigned to someone who is observed to be very friendly toward other members (frequently welcoming people in the Intro board, answering questions, etc.) This user has reported a valid and verified forum bug This user has made a suggestion for the forum that was approved and implemented
  • Posts: 6179
  • Gender: Male
  • This statement is a lie
    • Steam
    • Kingdom of Lacertus (clan website) we're not furry oriented, but we accept furries (especially artists) :P
    • Awards
  • Species: Fox
  • Coloring: Beige
  • Height: 183 cm
  • Weight: 65 KG
  • Build: Slim
  • Currently: Cruising through the 4th dimension
Re: What do you know about Operating System development?
« Reply #5 on: July 05, 2014, 07:16:25 PM »
I don't have any experience with OS development, although next year I'll most likely be taking a course on it. What I do know is assembler and working with microcontrollers, which if you want to work from the ground up, is an important first step to learning Operating Systems. The first thing is, you don't need to actually learn assembler, I learned Atmel AVR and a bit of ARM which were both pains to use, but you can do basically all assembler in C, so find an assembler language (there are thousands) that take your fancy (ARM is a good one, it's the language that is used on Smartphone processors, AVR is mainly for direct microcontrollers) and then take some tutorials on C.

  The main thing you need to learn is the concepts and how to apply them, it's good that you know C because it is very low level, possibly the lowest level third generation programming language. Which means transition to assembler won't be as difficult as it would be for someone who say, mainly programmed in Java or Basic. The core concepts remain the same, although there are some differences. For one, in assembler you don't have "variables" per sue, you instead have "registers" which are small tid-bits of memory where you store your data. Registers are essentially your variables (but think as them more as temps, as a register may switch between many different variables), but you usually have a limit of the registers you use (usually 16 or 32) the other thing is that with registers there is no such thing as an int, a char, a string or a double or float, it's all just binary there isn't even a difference between signed and unsigned. Although there are several functions in most Instruction Sets that use different data types, there really isn't any difference between an 8 bit "char" and an 8 bit int, it's up to the programmer to remember which is supposed to be char or an int and program the program accordingly. This however will be different for different assemblers, which as I mentioned before, there are thousands.

  You have to worry about very low level things (obviously) a lot more. You have to stop thinking of numbers in decimal but in binary and hex, you should be aware of how to translate a decimal, binary, hex or oct number to any other format quickly and efficiently. You should also be aware of how data types works, such as the binary representation of floating point numbers and doubles, as well as two's compliment. You also should read up on a bit of circuitry to start off, you're on such a low level that you need to worry about a lot of things, for an OS this mightn't be such a big deal, but for example input and outputs can be troubling because you have to sync the input to the clock of the CPU, you also have to worry about "debouncing" which is when a mechanical switch oscillates for a few milliseconds when clicked. One thing that always annoyed me is that the processor runs SO FAST, when I click a button even for a split second, it might think I clicked it 90,000 times. So I had to put lots of delays in to fix that issue xD.

  For Operating System in particular, some things are going to be very important. Interrupts are essentially to learn for assembler and operating systems, any time a program runs that immediately needs to operating systems attention an interrupt occurs. It's essentially a way for a program to halt all other (or some other) programs instantly and execute a series of instructions. You need to learn about timers as well, especially if C is your primary language because as far as I'm aware you don't [really] worry about timers (you do in C++), initializing timers and so forth in some programming languages can be a huge pain. A very important thing is priority, I don't know much about it other than the concept, but it's a hugely important thing in an operating system and how it's implemented is of utmost importance.

  Memory management is also an extremely important factor to make sure you know. Although C require memory management, there's even more to be done in assembler. For example, in some assemblers you can't necessarily use "malloc" to automatically allocate memory. You need to actively load different parts of memory and if you're using an assembler with Von Nuemann architecture like ARM, then your programs memory (IE: The memory that represents the actual code) could be in there too and you definitely do not want to overwrite that. Memory is also harder because it's the same situation as the variable issue, the memory is just one's and zero's, if you want to store a 64 bit double and a 32 bit integer in memory, you have to [remember] that the integer you stored is 4 bytes long and that the double you stored is 8 bytes, the computer won't do it for you. You also have to initialize your own stack, in case you don't know what the stack is it essentially keeps track of significant data when moving in and out of functions, it stores the return address for when the function is complete and any conflict registers (remember, no variables in assembler) on the stack so you don't overwrite previous data. Every time a function is called you add to the stack, and any time a function is completed you pop off the stack, this you need to do manually in assembler although most assemblers will have an instruction for this. Heaps are also not initialized and so you have to again manage it yourself.

  The last thing is that instruction sets can have very few instructions, although if you code it in C it mightn't be so bad, it's still handy to know how to do certain elementary functions with very little to work with. For example, AVR doesn't have a "divide" function, so when we want to divide we have to only use the add, subtract and loop functions to work by. Everything works very differently in the low level and you'll run into a whole bunch of problems you wouldn't think about, think of someone who learned java trying to learn C, he'd probably be quite confused by the new found memory management he has to take into account! So it is from learning C to assembler. It is a huge pain to learn and it was probably my least favourite course so far, the main reason is because I was working with actual hardware and [nothing] worked the way it was supposed to. Either way, I got pretty much average results and am awaiting my final results which I think I did relatively good at, we'll see! But Assembler is VERY annoying and things won't work like they're supposed to, you'll also be bombarded with acronyms that have no explanation but sometimes you just have to accept that and move on.

  Good luck on your adventure, in a year I would be able to help you with OS, but if you're really interested I do have some friends who did OS this semester who'd probably be willing to share some words of wisdom for you.
« Last Edit: July 05, 2014, 07:18:18 PM by anoni »
  • Avatar by: WingedZephyr
  • Signature art by: MrRazot
(int(e-x^2, x = -infinity..infinity))2 = Pi


We fight, we recruit, we are the anthropomorphic army. FDF forever!

$_ = "gntusbovueqrmwkradehijqr"; tr/a-z/lad hijacked under stop sign!/; print $_, "\n";

Offline Zeman

  • Avid Aardvark
  • *
  • awards This user has been a forum member for over 10 years
  • Posts: 16
  • Gender: Male
    • Steam
    • Awards
  • Species: Husky
  • Coloring: Grey Primary with White Secondary
Re: What do you know about Operating System development?
« Reply #6 on: July 06, 2014, 06:03:07 AM »
Anoni, really nice run down of all the issues I might run into. And I appreciate the offer for future help :) I will probably take you up on that.

For now what do you believe is more important? That I focus on learning assembly and working with small machine code, or to focus more on the OS aspects and write more code in C (admittedly Java is my main programming language and C# is the language I use for video game dev) so as to gain a better understanding of C?

Thanks for all the advice everyone has given thus far! It's really helping :)

Offline anoni

  • Zoomorphic Zebra
  • **********
  • awards This user has been a forum member for over 10 years Assigned to someone who is observed to be very friendly toward other members (frequently welcoming people in the Intro board, answering questions, etc.) This user has reported a valid and verified forum bug This user has made a suggestion for the forum that was approved and implemented
  • Posts: 6179
  • Gender: Male
  • This statement is a lie
    • Steam
    • Kingdom of Lacertus (clan website) we're not furry oriented, but we accept furries (especially artists) :P
    • Awards
  • Species: Fox
  • Coloring: Beige
  • Height: 183 cm
  • Weight: 65 KG
  • Build: Slim
  • Currently: Cruising through the 4th dimension
Re: What do you know about Operating System development?
« Reply #7 on: July 06, 2014, 07:56:01 AM »
It depends what you want to do. If you want to make some OS attachments or addons, maybe different versions of current operating systems, like programming in linux. You'd want to focus on the OS aspects more, you mightn't even have to do much coding cause you might be able to do it all in the kernal, I have no knowledge on that aspect though so it's up to you to research. If you want to actually attempt to make an OS from scratch (which btw is extremely difficult) or you want to learn more about how OS's actually work (which is a good skill to have in the job sector of compsci) then you'd want to work with assembler and machine code.

  In either case definitely learn C as much as possible, you should be aware on what pointers are and how to effectively use them, what functions are, memory allocation and things like that. You probably don't need to learn how to implement link lists, graphs and trees, but these are all good things to learn for programming in general, after all most video games use those aspects. There are some very good tutorials on it, but yeah generally the run down goes.

Learn C -> Learn microcontrollers (Assembler and stuff, again you can code assembler in C though) -> Learn Operating Systems

This is the computer science side of it though, a more practical side will just be taking tutorials on how linux works, and how to code bash scripts in linux and so forth.
  • Avatar by: WingedZephyr
  • Signature art by: MrRazot
(int(e-x^2, x = -infinity..infinity))2 = Pi


We fight, we recruit, we are the anthropomorphic army. FDF forever!

$_ = "gntusbovueqrmwkradehijqr"; tr/a-z/lad hijacked under stop sign!/; print $_, "\n";

 

Powered by EzPortal