2

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".

Celeritas
  • 8,341

2 Answers2

9

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.)

Synetech
  • 69,547
-6

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?

anon
  • 1