100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

1.2 Software and Software Development

Rating
-
Sold
-
Pages
16
Uploaded on
11-09-2024
Written in
2023/2024

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.

Show more Read less










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
September 11, 2024
Number of pages
16
Written in
2023/2024
Type
Other
Person
Unknown

Subjects

Content preview

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
£2.99
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
maddysunter1
5.0
(1)

Also available in package deal

Thumbnail
Package deal
OCR Computer Science A-Level - Full Notes Paper 1 & 2 (H446)
-
7 2024
£ 20.93 More info

Get to know the seller

Seller avatar
maddysunter1
View profile
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
1 year
Number of followers
0
Documents
16
Last sold
3 months ago

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions