I just finished a course on operating systems and the definition of an operating system is still unclear to me. Does any operating system itself take up resources such as CPU and memory? For example the scheduling algorithm must take some processing power to compare tasks to see which goes first and whatever data structure the tasks are held in takes up space.

Also the act of knowing what to do with virtual memory must take calculations which take up resources, right?

Hypothetically speaking, if a computer with one program and no operating system was running the program, the program would run to completion faster than on the same computer but with an operating system. Is that true?

EDIT: I agree the course was total crap, for amusement purposes here is the definition of OS we were given

What are Operating Systems? • Several possible definitions 1.The code that {Microsoft, Apple, Linux community, Google} provides 2.The code you depend upon that you also didn’t write 3.The code that runs in privileged mode 4.The code that makes things work 5.The code that makes things crash (rather cynical definition) 6. And many others...

What are OSes • An abstraction – providing an appropriate interface for applications executing on a computer to access that computer's resources – much hinges on how we define "appropriate" • A way to address different concerns – performance in time – performance in space – sharing and resource management – failure tolerance – security – marketability

This mockery of a textbook we had to spend $100+ on, defines operating systems as "it's that software that almost everything else depends upon. This is still vague, but then the term is used in a rather nebulous manner through out the industry".

  • I've never seen a program that runs without any operating system. Unless the said program is the Operating System. – Darius Dec 5 '13 at 4:11
  • @Darius oh really not even on embedded devices? e.g. My Ti-86 calculator has a "program" that does the quadratic formula for me. – Celeritas Dec 5 '13 at 4:11
  • If a program is run without an operating system, It must do much of what an operating system does. for some examples that do this look at programmable logic controllers. – hildred Dec 5 '13 at 4:20
  • @Celeritas, if you are using Z80 assembler, then you are close to the system, but even then, the calculator still has some sort of OS, otherwise your programs would be a lot more complex and include low-level machine-code to do even basic things (let alone with TI-BASIC). At the very least, an OS runs programs. For example, assembly programs in DOS may manipulate hardware, but they still run in DOS. – Synetech Dec 5 '13 at 4:21
  • @Celeritas My knowledge is limited, but my understanding is, that if the "program" that runs the embedded devices is not the Operating System of the device, what would it be called? And my assumption is that all other calculation or features done by it are additional programs running on the base operating system. My assumption: OS of the calculator would simply be "Display to screen" and "accept button pushes for screen display and calculation". But the actual calculation (quadratic formula) would be a program that the OS can call up to generate result.. no? (do correct me if I'm wrong) – Darius Dec 5 '13 at 4:22
up vote 10 down vote accepted

Does an operating system itself take up resources (aside from the space it is installed on)?

Yes.

I just finished a course on operating systems and the definition of an operating system is still unclear to me.

On a low-level, an operating system is no different than any other program; ultimately, it is nothing more than a bunch of CPU instructions. The only difference is that the instructions of an OS do something (more or less) different than those of a program.

The best way to describe an OS is as a meta-program. That is, instead of doing something, the program makes it possible for other programs to do something.

Does any operating system itself take up resources such as CPU and memory?

Yes, of course.

For example the scheduling algorithm must take some processing power to compare tasks to see which goes first and whatever data structure the tasks are held in takes up space.

Exactly. The OS’s functions are just piles of CPU instructions, and like functions in a user-program, they take up space and must run on the CPU.

Also the act of knowing what to do with virtual memory must take calculations which take up resources, right?

Naturally.

Hypothetically speaking, if a computer with one program and no operating system was running the program, the program would run to completion faster than on the same computer but with an operating system. Is that true?

Slightly.

Remember that CPUs are very fast and can perform a lot instructions in a small amount of time. Moreover, operating systems have been designed and tweaked extensively to be as optimal as possible, so they use as little CPU and memory as they can (at least theoretically). As such, the algorithms they use for things like scheduling, memory management, task-switching, hardware driving, etc. use relatively little resources. You can see this in a task-manager; when there are no programs running and the OS is trimmed down to the minimum, then there will be very little memory in use and the CPU will run at “0%”. (Again, we’re talking theoretically; Windows for example has been “bloating” as of late, so it may not apply to that anymore.)

If you just finished taking a course on operating systems, you should ask for your money back. Your question is so naive I can't really believe you aren't trolling for the solution to a homework question.

The modern view of an OS is a collection of service providers that applications can use to access resources on the computer, such as memory, CPU and I/O devices. Exactly where the line between OS and application is drawn is a religious matter (see debates between Andrew Tanenbaum and Linus Torvalds).

Modern operating systems serve to present isolated machine abstractions to applications, eg your application can't get at the memory being used by my application. To do this in a secure and safe manner, the critical code to manage the abstraction is generally isolated into something called the OS kernel. Once again, the line between what goes in the kernel versus what is a user-space shared library is open to debate.

Really, if this kind of stuff wasn't covered in your OS course, what the heck was was?

  • 2
    The question isn’t What is an OS? or even How is an OS different from a program?, it is whether an OS uses resources. I’m sure one of the former questions already exists, so you can move your answer to one of those where it will be more appropriate (assuming of course that your intention was to provide information rather than just insult). – Synetech Dec 5 '13 at 4:48
  • Any basic definition of an OS should, to anyone who's paying attention, imply that resources are used. If the original poster knew the proper definition of an OS, the question about resource utilization would be moot. – anon Dec 5 '13 at 4:58
  • 2
    @anon - While I might agree that somebody that just took a college course in Operating Systems asking a question, if the operating system itself uses CPU resources is naive, your complete and total disregard of the author's feeling isn't really appreciated and the only reason I issued a downvote. In other words throwing around insults is not going to earn you reputation and likely result in your inability to post answers. – Ramhound Dec 5 '13 at 5:41
  • Or even more to the point than emotions, the answer simply doesn’t address the question. I too find the answer to be trivial (at least to myself with years of low-level computer knowledge), but I can conceive that someone, even someone who took an OS course (which may or may not be as intricate as the one I once took) may not understand it quite right, or simply just be overwhelmed and confused by the amount of detailed information. That’s why I tried to post a succinct response in a way, addressing each point, in order to answer the question that was actually asked. – Synetech Dec 5 '13 at 6:06
  • Serious question: my textbook basically literally stated the definition of operating system is not clear cut and is often used in a variety of ways, is this correct? – Celeritas Dec 6 '13 at 4:53

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.