Logout

--- Role of the operating system ---

6.1.5

Explain the role of the operating system in terms of managing memory, peripherals and hardware interfaces.

 

Teaching Note:

For example, allocating storage and keeping track of programs in memory, swapping between programs on time-slicing, priority or when one is waiting for input.


Sample Question:

sdfsdfsf

From Sample Paper 1 - 2014:


From Sample Paper 1 - 2014:


JSR Notes

First of all note that there's another earlier, SL assessment statement almost the same as this; it's 2.1.6.

But for this it makes sense to focus in on the various specific things mentioned both in the assessment statement itself and the teaching note. So

Definition of "Operating System" - An operating system is the collection of software which runs a digital device. It has several roles, from low level interactions with the hardware, to high level interactions with the user. Common computer operating systems are the Mac OS, Windows, Unix, and Linux. Common mobile phone operating systems are Android, iOS and Windows Mobile, Nokia Asha etc.

 

I. OS Management of Memory

(Looking back to the earlier, SL, 2.1.6 that we did, this encompasses: Memory Management, Software Execution Control, File Maintenance, and Virtual Memory - you can see a repeat of that down below, also, in the "Former Curriculum" section of these notes.)

*** Definitely take a good look at the Mac OS utility Activity Monitor for this part of the assessment statement.

Review Definition of Memory

Computer memory is a general word for all data stored and worked with on a computer or other digital device. Within a computer or other device run by an operating system there are generally three categories of memory: cache, RAM, and secondary storage.

- Secondary storage maintains data files and applications in a permanent way. Generally, secondary storage is either some sort of magnetic media, such as a hard drive, or flash media such as SSD drive.
- RAM is fast, volatile, expensive memory, where data files and applications are loaded when they are being worked with.
- Cache is very fast RAM which is located on or very close to the CPU and is used for temporarily storing frequently used commands.

So, what needs to be managed vis-a-vis memory?

To help you get started, think in terms of "Where, what, when, how much" - in terms of from HD to RAM and from RAM through cache.



II. OS Management of Peripherals

(Looking back to the earlier, SL, 2.1.6 that we did, this encompasses the categories: Input/Output (I/O) Control, and Software/Hardware Interface, and Drivers Management - you can see a repeat of that down below, also, in the "Former Curriculum" section of these notes.)

First of all a Definition of "Peripherals" - A peripheral is any digital hardware component attached to a computer or other device which has input ports. (They are, literally, "peripheral" to the main machine; i.e. on the periphery; i.e. outside.) So peripherals are not hard-wired onto the motherboard of a device; they are therefore most often "third-party" hardware. Common peripherals to computers and laptops are mice, speakers, external hard drives, keyboards and monitors. Peripherals can be wireless as well as wired.

What needs to be managed vis-a-vis peripherals?

(Do note that it's not always only the device being connected to whose OS is managing things; the connected device, like a phone to a computer, may also have an OS, and so it will surely also be involved with handling the connection.)



III. OS Management of Hardware Interfaces

First of all a Definition of "Hardware Interfaces" - A point of interaction between two pieces of hardware. This could definitely include peripheral devices to computers, but as a separate category, we can thing of this as being the hardware interfaces between various components within a device; that in fact ship with the device, such as internal hard drives. Common hard drive hardware interfaces are SATA and IDE (Integrated Drive Electronics). Particular hardware interfaces have specific physical specifications (see the diagram below) as well as specific software protocols for the connection of the devices. (Continue reading below the diagram...)

Image of SATA hardware interface (above) and IDE hardware interface (below)
(both, as pictured, being used for the connection of conventional internal hard drives)

What needs to be managed vis-a-vis hardware interfaces?

 

 

And just a bit more focusing on each part of the Teaching Note:

"For example,
allocating storage and keeping track of programs in memory,
swapping between programs on time-slicing,
priority or when one is waiting for input."

- allocating storage and keeping track of programs in memory, By "storage" they would be referring to secondary storage, i.e. the hard drive, etc. To "allocate" is to allot a certain part of memory to something. And so the OS is responsible for determining where in secondary storage programs and data files to be kept long term are placed. Part of this would be optimizing where the programs are put, remembering that the more they are kept together on the hard drive (as opposed to being scattered, i.e. "fragmented") the better. And so "defragmentation" would also be included in the storage management - in which fragmented files are pieced together again all in one place.

In terms of keeping track of programs in memory, something has to do this in order for program and parts of those programs to be found by the CPU when executing code. The "memory" being referred to here would be RAM memory. (So "allocating storage and keeping track of programs in memory" would be referring both to secondary storage and to RAM memory.)

- swapping between programs on time-slicing, Time-slicing is actually a processing term, in which the processor shares out its time to multiple tasks. But the point here is that the OS will have to work hand in hand with the CPU to assure the things being processed on are in memory, indeed in the cache, possibly swapping out programs when they are not at the top of the time-slicing priority list.

- priority or when one is waiting for input. I think here they are referring to here is a couple of concepts coming up in the next assessment statement, "polling" and "interrupts". But one way or the other, the OS does have to help the CPU allot resources based on certain priorities. And taking the interrupt example, when an interrupt occurs in the CPU, the program associated with that interrupt needs to be in memory.

 

 

Finally, here is an all-in-one answer to a general 6.1.6 question, as in homework # 126, February 2015.

Q. Now look through the Teaching Note section of the notes (with blue type face). What if the one big question on your Paper 1 was

"Outline the operating system's management of memory, for example, allocating storage and keeping track of programs in memory, swapping between programs on time-slicing, priority or when one is waiting for input. [5 marks]"

How would you put that all into a couple of sentences - keeping in mind, for 5 marks, you would have about 7 minutes to write it. So for this question do answer that hypothetical IB exam question. [5 marks]

 

A. Model answer:


JSR: This is a tough one, and most of you did an OK job with your answer, all things considered. Never-the-less, take a look at this model answer: The OS manages memory in many ways. It allocates storage, i.e. putting files to the hard drive, and it also allocates running programs to RAM memory, and determines how much RAM each is allowed to use. Furthermore, during actual processing, parts of programs running in RAM memory will be swapped in and out of the CPU which "shares" processing of multiple applications via "time-slicing". Also, the CPU will swap in and out various processes based on priority (for example interrupts taking priority over normal user-lanuched programs), or when it is waiting for input and can work on background tasks such as indexing the hard drive.

 

 

 

 

------- OPTIONAL / ADDITIONAL FROM THIS POINT ON --------

 

JSR Notes - FORMER CURRICULUM - 6.3.1 Define operating system.

Ok, here’s a definition for you:

Operating System: A certain kind of system software that is required to run and operate your computer.  In fact, it is the interface between the hardware and the applications software or computers.  The most common operating systems on personal computers today are Windows XP, Vista, the Mac OS X, and all versions of UNIX. 

But an operating system is defined collectively, in fact by all of the various jobs that it does. 

But do keep in mind that there’s more to Window than Windows Explorer, and more to the Mac OS than the Finder application.  Both the Windows Explorer and Finder are application software that act as an interface between the user and the OS, rather than the OS which is an interface between the user’s applications and the hardware.  So the Windows Explorer and Finder are simply a very visible part of the whole Operating System.

So to get a more global understanding of what the OS is responsible for, go on to 6.3.2.

 

JSR Notes - FORMER CURRICULUM - 6.3.2 Explain the function of operating systems. :

And actually, in terms of satisfying the assessment statement, you can’t do much better than the above teaching note.  You should really have an understanding of what each of those things is, but listing them off as above would be a really good start.  Never-the-less, what follows is a bit more on each of them.  But a really good point to make here is that the following list is straight out of the syllabus, so it’s as good or better than any arrangement/order of the same things in the textbook; looking at and understanding both ways of putting it would be best.

 

Memory

Memory Management – All activities that are going on in the computer would take all of the RAM if they could, so something has to parcel out the memory in a fair, and efficient manner, prioritizing as it goes.

Software Execution Control – This is the management itself of what applications run, and when.

File Maintenance – This is all the lower level file organization that is required to keep things functioning properly.  The File Allocation Table, in particular has to be managed and maintained so that files are able to be found – and not just user files, but files used by the computer itself.

Virtual Memory Management – Virtual memory is the use of the hard drive as RAM memory; it’s obviously slower, but almost all applications do use virtual memory, though they continually swap in and out of RAM the most important information needed.

 

Peripherals

Input/Output (I/O) Control – There needs to be a software interface between all peripherals and the computer; so here we’re talking about management of communication between the computer and all sorts of peripherals, like mice, keyboards, and printers, to name a few.

Software/hardware interface – All applications have to be able to properly access the various hardware they need, to do what they do.  As does the operating system itself, in fact.

Drivers Management - Drivers are programs that operate specific hardware; the OS is responsible for interfacing with drivers, and making use of them.

 

User Level

File Management - This is the user-level management of user files and folders a la Windows Explorer on Windows machines or the Finder on Macs

User Interface – This is the Finder/Windows Explorer etc.  It allows the user to interact with the computer, and to set it up in an optimal way for his/her particular circumstances.

Security -  Everything from firewalls to user accounts to permissions are all part of this most important category of tasks.