6.1.1 Identify the resources that need to be managed within a computer system.

Primary memory RAM

Main Memory (AKA internal memory or primary storage).
It is used to store data temporarily. RAM is volatile (meaning that when turned off all data in the RAM is lost).
The main memory is used to store data while it is being processed by the CPU. It can be input and read very quickly. 

The computer divides up the information you have and splits into temporary information that needs to be access quickly by the operating system and permanent information that needs to be stored in the hard drive. Because it only stores data temporarily it means that the RAM is volatile (when the computer is turned off all the data stored in the RAM is erased).

Effect on system if  RAM too limited:

Primary memory ROM (Read Only Memory)

The microprocessor can read from ROM, but it can’t write or modify it. ROM is permanent. Often, ROM chips contain special instructions for the computer, like the BIOS. 

Primary Memory Cache

This is a high speed storing mechanism. There are two types of caching used: memory caching and disk caching. 
The memory caching is a high portion of the memory used for really fast access to memory. It is also known as SRAM and can be considered a faster version of RAM. It is effective for programs or data used over and over again. Depending on the speed of the cache and where it is located it is given different levels (used to differentiate them, just like names). The most common types of memory cache are L1 and L2.

Typical Size

Megabytes (MB): 1 to 128

Impact of Insufficient Cache

Secondary Memory ( Hard Disk / Drive ) 

Backing storage (sometimes known as secondary storage) is the name for all other data storage devices in a computer: hard-drive, etc.

Backing storage is  non-volatile, so it is generally used to store data for a long time.

Impact of Limited Secondary memory

Difference between SSD and HDD

The main difference between SSD and HDD is that a solid state drive uses no moving mechanical parts to write data to disk. SDD technology uses integrated circuits in place of a spinning magnetic disk in which it uses to store and access data as memory through traditional i/o (input, output) requests. The result is a hard drive that operates much quieter with less latency and with less risk to physical damage than an HDD.

HDDs are more traditional and utilize a spinning magnetic disk on which data is written to, stored and accessed time and time again until the end of its life cycle. HDDs are slowly being phased out by SDDs, the latter of which continues to decrease in price. HDDs shouldn’t be overlooked in terms of how capable they are, especially in non commercial applications. A reasonably priced HDD won’t set you back nearly as much than a SSD and is a suitable replacement for that ailing hard drive in your desktop or laptop.

GPU

Network Connectivity

Screen Resolution

In computers, resolution is the number of pixels (individual points of colour) contained on a display monitor, expressed in terms of the number of pixels on the horizontal axis and the number on the vertical axis. The sharpness of the image on a display depends on the resolution and the size of the monitor. The same pixel resolution will be sharper on a smaller monitor and gradually lose sharpness on larger monitors because the same number of pixels are being spread out over a larger number of inches.

Processor speed

Processor speed is one of the most important statistics for a computer, you can think of the processor speed as the ‘brain speed’ of your computer. The larger your processor speed the more programs you can run on your computer, and the faster and better they will run. Nevertheless if your have a very fast processor but the rest is unbalanced, it wouldn’t work very effectively. Processor speed varies a lot, depending on what device you’re using and its quality. The recent “intel core i7” processor speed varies from 2.8GHz to 4.0GHz.

Impact of Slow Processor 

6.1.2 Evaluate the resources available in a variety of computer systems.

Super Computers

Supercomputers are used for example for quantum physics, molecular modelling, weather forecasting, oil and gas exploration. 

Limitations

Supercomputers can be very expensive. They also take up a lot of space and require specialized staff. Also they may have very specific applications and still don’t replace physical testing.

Mainframe

Mainly in large organization for critical applications, bulk data processing as census, statistics, enterprise resource planning and transaction processing.

Limitations

High costs. A hardware problem may affect all the users working on the system. They also take up more space and require special operating systems.

Servers

A server is a computer that manages resources on a network. It may be used for files, databases, print jobs, DNS, emails, etc.

Limitations

Still high costs. Special operating system may be needed and specialized staff as a network manager are required.

PCs

General purpose aimed at individuals without any kind of intervention between the end-user and PC. Fixed.

Limitations

A pc is not portable and takes up quite some space. It also requires external peripherals as a mouse, keyboard and monitor.

Laptop

Same as a PC but portable

Limitations

They are more expensive and less economic than a desktop. They usually also are less powerful and easily overheat due to its compact construction. Laptops may also be easier to be stolen or lost due to their size.

Smart Phones

Used as a mobile phone with extended functionality by most people in the modern world. Used in the private sector, but also in companies.

Limitations

The constant digital connection via smartphones can lead to less real human interaction (why meet if you can chat?), but can also lead to accidents, as it distracts us from the real world. There are also many privacy and security concerns – there are many bugs, which allow exploitation or do you really know how much information Google or Apple gather about you?

Digital Cameras

Used to take pictures on a digital sensor, maybe process them and store them digitally on a memory card.

Limitations

There may be a serious loss of data if the memory card fails. Also the camera isn’t able to take pictures if the battery runs out. Also people tend to print less pictures for posterity, as they usually just keep them on their computers.


6.1.3 Identify the limitations of a range of resources in a specified computer system. 

6.1.4 Describe the possible problems resulting from the limitations

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

6.1.6 No 6.1.6 ?

6.1.7 Outline OS resource management techniques: scheduling, policies, multitasking, virtual memory, paging, interrupt, polling.

Operating System - Process Scheduling / Polices /Mechanism

The process scheduling is the activity of the process manager that handles the removal of the running process from the CPU and the selection of another process on the basis of a particular strategy.

Process scheduling is an essential part of a Multiprogramming operating systems. Such operating systems allow more than one process to be loaded into the executable memory at a time and the loaded process shares the CPU using time multiplexing.

A Process Scheduler schedules different processes to be assigned to the CPU based on particular scheduling algorithms. There are six popular process scheduling algorithms which we are going to discuss in this chapter −

Process Control Block (PCB)

A Process Control Block is a data structure maintained by the Operating System for every process. The PCB is identified by an integer process ID (PID). A PCB keeps all the information needed to keep track of a process

  • First-Come, First-Served (FCFS) Scheduling
  • Shortest-Job-Next (SJN) Scheduling
  • Priority Scheduling
  • Shortest Remaining Time
  • Round Robin(RR) Scheduling
  • Multiple-Level Queues Scheduling

First Come First Serve (FCFS)

  • Jobs are executed on first come, first serve basis.
  • It is a non-preemptive, pre-emptive scheduling algorithm.
  • Easy to understand and implement.
  • Its implementation is based on FIFO queue.
  • Poor in performance as average wait time is high.

Policy  vs Mechanism

Policies are ways to choose which activities to perform. Mechanisms are the implementations that enforce policies, and often depend to some extent on the hardware on which the operating system runs. For instance, a processes may be granted resources using the first come, first serve policy. This policy may be implemented using a queue of requests

Virtual Memory

When there are shortages of physical memory (i.e. Memory slots are very full) a method called Virtual Memory is used. Virtual Memory is transferring data that is stored in primary memory (e.g RAM) into disk storage i.e your Hard Drive.

Although this process makes programs run slower as the Hard Drive is slower than primary memory therefore if you are looking for performance it would be better to have large RAM capacity so that virtual memory is only used when opening new programs. On the other side it is more economically beneficial as it makes it seem like you have unlimited RAM though in reality you don’t.

When you are running man programs at the same time and you RAM is not enough to cope virtual memory plays a big role, and is constantly swapping information between RAM and Hard Drive, this is called thrashing and it makes your computer run very slowly.
The information that is stored in the hard drives stored in "page files".

When there are shortages of physical memory (i.e. Memory slots are very full) a method called Virtual Memory is used. Virtual Memory is transferring data that is stored in primary memory (e.g RAM) into disk storage i.e your Hard Drive.

Paging vs Swapping

Paging and Swapping are two memory management strategies. For execution, each process is required to be placed in main memory. Swapping and Paging both places the process in main memory for execution. Swapping could be added to any CPU scheduling algorithm where processes are swapped from main memory to back store and swapped backed to main memory. Paging allows the physical address space of a process to be non contiguous.

Paging

Individual  pages or segments of the program are moved to secondary memory   ( page fault occurs when it is requested ) Segment chosen if it has not  been referenced for  awhile

Swapping

Moves the whole process to secondary memory ( OS may us if not been used for some time ( inactive) or thinks will not be used for some time) 

Multitasking

Multitasking operating systems are capable of running more than one program at a time. Nowadays, OS are configured to execute multiple programs simultaneously. Older operating systems would switch system resources back and forth between two or more running processes. In order to multitask, computers time-slice. This is, the system would freeze the executed program for a few seconds and then execute tasks for another program. Time-slicing is considerably efficient since the time lag for the operator was of no more than a few seconds. Today, most desktop, laptop, and netbook operating systems function with some type of multitasking operating system. In the early stages of multitasking, operating systems did not truly multitask but did rapid switching between programs that seemed simultaneous. Modern computers with only one processor are capable of seeming to perform multiple tasks simultaneously by time-slicing with improved performance. However, multiple processors allow many different programs to run at the same time.

Interrupt

An interrupt is a signal from a device attached to a computer or from a program within the computer that causes the operating system to stop and figure out what to do next. Almost all personal (or larger) computers today are interrupt-driven - that is, they start down the list of computer instruction s in one program (perhaps an application such as a word processor) and keep running the instructions until either (A) they can't go any further or (B) an interrupt signal is sensed. After the interrupt signal is sensed, the computer either resumes running the program it was running or begins running another program.

Hardware interrupts are used by devices to communicate that they require attention from the operating system.

Polling

Polling, or polled operation, in computer science, refers to actively sampling the status of an external device by a client program as a synchronous activity. Polling is most often used in terms of input/output (I/O), and is also referred to as polled I/O or software-driven I/O.

Polling has the disadvantage that if there are too many devices to check, the time required to poll them can exceed the time available to service the I/O device

Polling is often intimately involved with very low-level hardware. For example, polling a parallel printer port to check whether it is ready for another character involves examining as little as one bit of a byte. That bit represents, at the time of reading, whether a single wire in the printer cable is at low or high voltage. The I/O instruction that reads this byte directly transfers the voltage state of eight real world wires to the eight circuits (flip flops) that make up one byte of a CPU register.

6.1.8 Discuss the advantages of producing a dedicated operating system for a device.

A dedicated operating system ensures a higher level of security. Banks, for example, would require a dedicated operating system to prevent cyber attacks on financial transactions. Dedicated operating systems custom made to do a specific function at maximum efficiency.By having a custom OS you can eliminate certain aspects of the OS which are not needed, reducing the size of the OS, therefore reducing the amount of secondary memory and RAM being used. Furthermore, dedicated operating systems can modify priorities of the system which can make running some programs easier

Examples of dedicated OS: IOS 8 for iPhones and OS X for Macs, Ubuntu Kylin for Chinese users

6.1.9 Outline how an operating system hides the complexity of the hardware from users and applications.

Section Review Questions

Quick 10  minute Presentation on Wed 30th Jan 

  • 1
    Identify the resources that need to be managed within a mainframe computer used by a university to run applications and store data for six computer labs around the campus, and various professor's computers. The total number of computers being served by the mainframe is 120 ( Luka, DH, Nick)
  • 2
    Identify the resources that need to be managed within a smart phone to be used by a doctor who both works in a hospital and also does house calls ( Shaafi, Woohyun, ViVi)
  • 3
    Describe/Present  4 ways a user may interact with an operating system ( Hasina, Nandini,US) 
  • 4
    Describe/Present 6 resources on a typical PC that the operating system will manage (TY, Ling, Sandy) 

Lesson 2  ( Scheduling )

Learning Objectives

  • Understand How Virtual memory works and difference between Paging and Swapping
  • Understand the difference between Polling and an Interrupt
  • Policy  vs Mechanism

New Terms

Multi Tasking

Multi user

Single User 

Real Time

Round Robin(RR)

Scheduling 

First Come First Served

Policy

Mechanism

Paging

Virtual memory

Swapping

Dead Lock

Trashing

Virtual memory

Swapping


History of the Operating System

1940's  First Generation ( switches ) Enigma Machine

1950's  Second Punch Cards, mag Tape, Batch 

1960's  Third Gen  Multi programming

Forth generation Workstation MS-DOS


Types of Operating System

Human

Single User ( single task at a time/Batch ) Early Computers

Single User Multi Tasking ( Basic PC Workstation )

Multi User  ( Windows Server 2012 )- University Main Frames - Many users One Computer

Real Time ? ( earliest deadline first) examples?


Questions 

Why do we Need resource management ? The purpose ?

What are the resources in a typical Computer


What is Process Scheduling : Why do we need it ?  Has your Computer ever Frozen

Reduce Wait Time

Reduce Total process Time

Which Scheduling Policy ? 

Fairness is the Goal ( shopping cart analogy )

First Come First Served ( not very fair if big job in front )

Round Robin ( better )

Shortest Job First

Avoid Dead Lock ( Deadly Embrace )


Basic Functions of an O/S

Memory management ( RAM) Primary

Memory management Secondary

File Management ( writing/reading  )

Device ( I/O) Management - Sharing Devices

Networking

User Interface ( Command Line ) Menu Driven ( GUI )  (Voice) 

Security 

Policy Mechanism 

CPU PROTECTION

Policy  : Stop Deadly Embrace / Deadlock , How ? Set max time for each process ? Only start process if can allocate all resource that it needs.

Why Separate ? More Flexibility , Can Use mechanism for other Policies ( think subroutine ) 

Analogy : Policy : Limit Access of people to rooms in business:  Mechanism Door Card / Retina Scan /   

Past paper examples

2017 paper 1 9. Explain two functions that an operating system needs to perform in relation to multitasking. [4]

2016 paper 1  9. Explain two functions that an operating system needs to perform in relation to multitasking. [4]

2017 4. Explain why cache memory can speed up the processing within a computer. [2]

May 2017  5. One of the functions of an operating system is memory management. 
Describe how this function prevents the system from crashing when more than one program is run at the same time.

Nov 2017 paper 1 A biotechnology company owns a resource centre which collects and classifies organisms for use in research.
Only authorized employees are allowed access to some laboratories in the resource centre.
These laboratories are protected by locked doors. Each door is controlled by a separate microprocessor. A digital camera is used to scan the iris of an employee who wishes to enter the lab. If the employee is authorized the doors are unlocked.
(a) Identify two benefits of using a digital camera as an input device in this control system. [2]
(b) Outline the use of a microprocessor in this control system. [2]
(c) Outline the function of an output transducer. [2]
The company is planning to use a centralized computer system to secure the resource centre’s building.
(d) Compare a centrally controlled system with the system described above. [4]
The operating system has an important role in this system.
(e) Identify two functions of the operating system. [2]
Polling and interrupt are two operating system management techniques.
(f) Suggest with reasons which of these two techniques is the most appropriate for this centrally controlled system. [3]