100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
1.2 Software and Software Development $4.12   Add to cart

Other

1.2 Software and Software Development

 7 views  0 purchase
  • Course
  • Institution

This is the topic: 1.2 Software and Software Development for the OCR A-Level Computer Science (H446) course. I got 4 A*s in my A-Levels (Computer Science, Physics, Maths, Further Maths) , so they are very detailed and cover all of the specification for this topic.

Preview 3 out of 16  pages

  • September 11, 2024
  • 16
  • 2023/2024
  • Other
  • Unknown
avatar-seller
1.2 Software and software development


1.2.1 Operating Systems

The Purpose and Function of Operating Systems:

An operating system (OS) provides an interface between the user and the computer’s hardware as a
user can’t communicate with the hardware directly. They manage the hardware and software
resources of a computer system. It is held in permanent storage (e.g. on a hard disk), and when the
computer turns on the loader (in ROM) sends instructions to load the OS by copying it from storage
into RAM.

Functions of an OS:

 Provides a user interface:
o An OS provides interaction via a graphical-user interface (GUI) or text-based through
a command-line interface (CLI). Most modern PC OSs provide both.
 Provides utility software (disk defragmenter, backup, formatting):
o These help with system maintenance and security.
o These include file encryption, file compression, disk defragmentation, system
backup, disk cleanup.
 Resource management:
o They manage the computer’s resources such as the CPU, memory, disk drives and
printers.
o They allocate resources to specific tasks and ensure they’re used effectively, such as
how much memory (paging, segmentation, virtual memory), when and how long
each uses the CPU (scheduling), and how to handle data being read from/written to
the hard drive.
 File management:
o They handle the storage, retrieval and manipulation of data files.
o An OS provides a GUI of the file system allowing a user to decide what directory a
file should be saved in and its name.
 Interrupt handling :
o Interrupts require ethe immediate attention of the CPU.
o To maintain the smooth running of the system, these ned to be handled and
processed quickly.
 Provides security:
o They provide password-protected system accounts, a firewall, virus scanning and file
encryption.
o System accounts can also be restricted from performing certain actions (e.g. editing
network settings, installing unapproved software).
 Input/output management (device drivers)

Memory Management:

Every open program must be allocated a specific area of active memory (after being loaded from
storage) in order for a user to have multiple programs open simultaneously. The allocation, &
management of space is controlled by the OS.

Disk defragmentation isn’t always done because it takes a lot of time. Instead, memory is split into
small sections using paging or segmentation:



1

,Paging:

 Memory is portioned into fixed sizes called pages.
 Pages are made to fit sections of memory & are physical divisions.
 The programs are split up to fit into a given number of pages & a page table keeps track of
their page number (as the parts of the program might not be located next to each other).
 It facilitates efficient memory management and enables the use of virtual memory.
 Paging takes no account of how it splits the program. It could separate instructions inside a
loop so they’re in different pages, however this isn’t very efficient (it would be better to keep
them together in main memory).
 It can lead to internal fragmentation, where pockets of wasted space exist across memory as
there is unoccupied space within in a page.




Segmentation:

 Memory is divided into logical divisions (e.g. loops) called segments.
 Segments are different sizes according to their contents & complete sections of programs.
 This allows for intuitive and efficient memory access.
 It can lead to external fragmentation, where as segments fill up the memory, physical gaps
reduce the maximum size of new segments that can be allocated. This can be fixed with
defragmentation.




Virtual Memory (not virtual storage):

When free memory runs low, virtual memory must be used. This is part of secondary storage that
acts as RAM. Sections of programs that aren’t currently in use are temporarily moved into virtual
memory through paging and when these instructions are needed again, they are swapped out of
virtual memory into RAM with a different section of a program. It is slower to access than RAM.

However, if pages are swapped too frequently between secondary storage/the hard disk and main
memory, more time is spent transferring these pages than is spent running the program. This slows
down the computer’s performance and is known as disk thrashing.

“Why is memory management important?”:

 It organises the use of main memory
 …by converting logical addresses into physical addresses.
 It allocates memory, allowing programs to share memory.
 It protects programs and data from each other.
 It allows programs larger than main memory to run.




2

, Interrupts:

An interrupt is a signal sent to the processor that stops its current task and performs a different task
temporarily. When it occurs, the processor suspends the current program and transfers control to an
interrupt service routine (ISR).

Examples of Interrupts:

 Hardware: Generated by external devices. Keyboard input; mouse movements; power
supply failure; power/reset button; power-down command
 Software: Triggered by software or the OS. Application requests to open a file; division by
zero errors; illegal instruction encountered; arithmetic overflow; new log-on request
 Timer: Data-logging program reading an input sensor every second; screen-recording app
 Trap Interrupts: Intentionally triggered by a program. Software debugging; handling
unexpected error cases.
 Input/Output Devices: Buffer nearly empty; signal the completion of a data transfer to/from
a device; printer ink supply notification

The OS ensures interrupts are serviced fairly by the processor through the Interrupt Service Routine:

Interrupt Service Routine (ISR):

A program with a set of instructions that need to be f-d-ed to carry out the operations of the
interrupt. Therefore, the contents of the PC are changed to hold the address for the first instruction
of the interrupt.

1. The processor checks the contents of the interrupt register at the end of every f-d-e cycle.
2. When an interrupt is received, if it is of a higher priority than the current task, the values
held in the registers are copied into a data structure in memory called a stack.
3. These values are pushed onto the stack in a stack frame.
4. The interrupt is now executed, as the ISR is loaded by loading the relevant value into the PC.
5. The frame on the top of the stack is popped off, allowing the processor to retrieve the
previous values from the original program, load them back into the registers, and carry on
executing the original program where it was left off.

If the processor is executing the first interrupt and another higher-priority interrupt occurs: The first
interrupt is suspended, the register contents are pushed onto the top of the stack in a stack frame
and the higher-priority interrupt is executed.

ISRs should be concise, efficient and designed to minimise the time taken to execute, as they often
need to handle time-sensitive events.

Scheduling:

The OS needs to ensure all sections of running programs receive a fair amount of processor time, so
multiple programs can be run (seemingly) simultaneously. This is done by scheduling, using various
scheduling algorithms.

A scheduler manages which process to execute next and the length of time the next process can
execute for.




3

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller maddysunter1. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $4.12. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

76202 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$4.12
  • (0)
  Add to cart