System Software Flashcards
OS and what it is
Operating system
the main software that controls how a computer operates
function of the OS
control the hardware of the computer system; hard disk, graphic card
manages software; loading / unloading into main memory
provides security; username and password
interface; allows you to interact with the computer
Parts of an OS
Kernel
Device drivers
User Interface
System utilities
Kernel function
Loading / unloading applications from memory
scheduling tasks to run efficiently on the CPU
memory management
file storage to and from secondary storage devices such as the hard disk
file management
data security
Kernels in different OS will …
vary in tasks depending on the system
Device Drivers 1
The OS communicates with lots of different devices and each require a device driver
Drivers for the internal hardware are normally pre installed but can download from a companies website
The devices driver allows the OS to communicate with which devices
RAM, HDD, graphics card, printer, monitor, mouse
External devices like printers…
normally come with device drivers on a CD, USB etc
User Interface function
Allows you to interact with the computer
GUI
Command Line Interface
Natural Languages
Menu Based
GUI
Graphical User Interface
WIMP
User friendly
users pictures, icons to make it intuitive
slower to perform tasks
WIMP
Windows, Icons, Menus, Pointers
Command Line Interface
Interact with the Computer system by typing commands into the screen
Natural Languages
reacting to voice
Alexa, telephone menu system
can struggle with accents
good where keyboard is not practical
issues in noisy environment
System Utilities
Provides basic facilities that run in the background
print spool services
cryptographic password management
file management services
anti-virus utility
disk defragmenter utility
file compression utility
Virtual Memory
Even in modern computer you can run out of RAM
This is when the operating system will use ‘virtual memory’
The OS will identify RAM that isn’t in use and will copy this to secondary storage
This frees up a block of RAM to be used for the program that is in use
This will effect performance as it takes time to perform the swapping of data
If the computer is low on RAM the operating system may spend more time swapping and less time executing the task. This is called thrashing and the operating system will try and avoid this
If thrashing starts then the operating system may terminate programs that are taking up too much RAM but data might be lost
Memory Management pg1
Memory is limited in size so with processes being loaded and run it needs to be managed
this is to prevent processes overwriting over processes data
each process is given it’s own segment of memory
the memory manager assigns each process a segment of main memory
these segments are further divided to each have a ‘stack’, ‘free memory’, etc
A process is an executable application that’s loaded into memory
Types of Memory management
paging, segmentation and virtual memory
How paging and segmentation are similar
both allow programs to run despite insufficient memory
both pages and segments are stored on disk
both pages and segments are transferred into memory when needed
how paging and segmentation are different
pages are fixed size
pages are made to fit sections of memory
pages are physical divisions
segments are different sizes
segments are complete sections of programs
segments are logical divisions
Problems with both paging and segmentation
If physical memory is running low, virtual memory has to be used
If more time is spent moving pages/segments in and out of the memory to the disk (thrashing) than actually processing the instruction, the computer will be very slow
Typical memory segment of a process
stack segment
free memory
data segment
code segment
Segmentation
Logical division of memory. The sizes of each segments may be unequal
Memory segment is broken down further into …
Code seg - program instructions
Data seg - for variables the programs use
stack seg - allows for subroutines
- when a subroutine is called the program notes where it was called
- And added to stack
Free memory - for when the stack grows and shrinks
virtual memory sections
when RAM gets too full, the memory manager may mark sections of secondary storage (on the hard disk) to act as main memory. These sections are called virtual memory
Very slow for the CPU to access
When the CPU needs data held in virtual memory, the memory manager re-loads it into RAM, swapping out less-used data to make room for it
Swapping data in and out of virtual memory is a slow process, so if virtual memory is in heavy use, the computer seems slower
if virtual memory is in heavy use …
the computer seems slower because swapping data in and out of virtual memory is a slow process
(disk) thrashing
excessive use of the hard disk as virtual memory is called disk thrashing
RAM & virtual memory structure
RAM to Virtual Memory = less used data
Virtual Memory to RAM = data needed by the CPU
virtual memory is in the hard disk but RAM is not
paging with example page number 3233
When RAM is getting full, the memory manager can work out the least used page/segment
that page/segment is then copied down into virtual memory
page number 3233 will be moved into virtual memory
The free area is re-numbered by the memory manager, and marked as free for use
if the content of page 3233 is needed, it is swapped back into RAM
Memory Leaks
When a memory location is in use, the memory manager will mark it as being unavailable for any other process
A program should flush its data away once it no longer needs it. The memory is marked as free, and the memory manager assigns it for other processes to use
Badly-written program will not flush data properly. The memory remains unavailable. As the program continues to run, more and more memory gets locked up.
this is called a “memory leak”
If the leak is bad enough, then the system eventually runs out of memory. Causing the computer to start running slower before it needs rebooting
What is a memory leak
When badly-written program cannot flush its data properly meaning the memory remains unavailable and as the program continues to run, more and more memory gets locked up
if the leak is bad enough, …
then the system eventually runs out of memory. causing the computer to start running slower before it needs rebooting
overflow
it grows because every time a function calls another function, the address of the first is stored in the stack along with any parameters it uses