Unit 2 - November 6 Flashcards
Operating system functions
File management Memory management Utility programs User interface Input/output management Interrupt handling Processor scheduling
Paging
Fixed, equally sized memory blocks
Physical divisions
Made to fit sections of memory
Makes use of VM
Segmentation
Complete sections of programs
Logical divisions
Different sized memory blocks
Virtual memory and paging
Sections of programs not in use are temporarily moved into VM
However Disk thrashing may occur
- when more time is spent reading/writing than processing
Types of interrupt
Power fail Power down command Input/output requests Clock interrupt Schedule interrupt
ISR
Current data moved into stack in stack frame
ISR begins
Priority considered
Executed in order of priority
When all interrupts complete lid is popped off and original values loaded back onto the registers
Scheduling
Decides which instructions are executed when multitasking
Schedular is used to allocate efficient processor time to run each OPEN PROCESS
Round Robin
Each job given an equal time slice
Once the job at the front of the queue has used its time slice, if it’s completed it’s removed from the queue, but if it’s unfinished it moves to the back of the queue and the next job begins processing
First come first served
Jobs are processed in chronological order (the order they arrived in queue)
Processed to completion regardless of execution time
Multi level feedback queue
Uses multiple queues, each ordered on priority
Shortest job first
The queue is ordered based on the time for completion
Jobs that require the least time are moved to the front of the queue
Processor starvation
Shortest time remaining
Queue ordered based on time LEFT for completion
Programs with least time LEFT is executed first
Processor starvation
Distributed OS
Uses processing power of multiple computers
Presents to the user as though it is one system
Spreads the processing load
Embedded OS
Dedicated hardware used to perform a small range of specific tasks
Has little memory and consumes less power
Program store in ROM
Multi-User OS
A server manages permissions and access rights when users log on
Handles requests of multiple people
Allows multiple people to access at once
Scheduling program ensures fair processor time
Multi-Tasking OS
Gives the appearance that task are being completed simultaneously
Uses time slicing to allocate CPU time
Real-Time OS
Designed to perform tasks in a guaranteed time frame
Has plenty of redundancy to enable it to handle a sudden increase of input
Rarely runs at full capacity
BIOS
Stored in ROM Basic Input Output System Stores bootstrap loader - first instructions of a computer Loads the OS into RAM Checks and configures hardware POST Power On Self Test
Device driver
Enables communication between the OS and input/outputs by translating instructions into language the other understands
Intermediate code
Pre compiled code that becomes platform independent
Virtual Machine
Software that is designed to have the same functionality as a physical computer
Code is emulated
Provides a translator for intermediate code
Emulate
Trick code into thinking it’s running on its original hardware but it’s running on a different machine
Eg Old Arcade Games
Testing video games on different devices before release
Generic applications
non specific purpose
Used on wide variety of tasks and can meet multiple needs
Most commonly used
Specific applications
Specific or bespoke purpose
Little use other than deigned tasks
Usually only installed on systems where there’s direct need
Word processor
Format and manipulate text
Database software
Create and manage databases
Spreadsheet software
Create and manage spreadsheets
Other examples of application software
Multimedia - can run on multiple platforms
Communication - enables communication
Graphic - visually edit images and videos
Disk defragmenter
Reorganises files in hard disk so they’re sequential
Reduces movement of r/w head
Results in files being able to be read faster
Compression
Reduces space files take up
Files can be transferred quicker
Can be downloaded from internet quicker
Effective cost management and saving
Automatic updates
Ensures system is kept up to date
Tackles bugs and security flaws
Minimises risks from malware and hackers (less vulnerable)
Encryption
Converts data into non human readable for,at using a key
Symmetrical = same key to decipher
Asymmetrical = different key to decipher
Anti virus
Scams against known list of viruses
Uses heuristics to try identify known viruses
Quarantines potential viruses and flags user
User decides next steps
Automatic backup
Data in permanent storage needs to be backed up
Means you have copies of data gets lost, stolen or damaged
Open source advantages
Code can be modified
Free
Access to source code
Can be installed on any number of computers
Open source disadvantages
Not always fully tested
May be poorly supported
No financial gain for creators
Closed/Proprietary advantages
Well tested
Company many provide free updates
Usually fully supported by creators
Creators receive financial gain
Closed/Proprietary disadvantages
Cost for license
Cannot modify or redistribute software
Cant share with other users
No access to source code
Off the shelf software
Ready made and available for anyone to purchase
Cheaper than bespoke
General - not designed for specific purpose
Bespoke
Specifically made for larger companies
More expensive
Has very specific purposes made for users requirements
take longer to be created
Typically only available for who/the company it was created for
COMPILER vs interpreter
Faster to execute
Can run many times without needed to be recompiled
Executable doesn’t require translator to run
Code can’t be reversed once compiled
compiler vs INTERPRETER
Translated line by line
Stops for errors
If error is found no need to recompile entire program
Can run on any machine with interpreter
Library
Precompiled and pretested programs which can be added into a program
Saves development time
Linker
Allows already compiled object code files to be combined with the compiled program
Loader
Copies a program held on backing store into main memory ready to be executed
Examples of tokens
Keywords Constants Numbers Punctuation Strings Operators Identifiers
Lexical anlysis
Puts each code statement into form best suited for the syntax analyser
Lexer reads source code
Stops at white spaces or comments
Code is turned into tokens
Syntax analysis
Syntax tree is built from tokens produced in previous stage
It’s the process of the language statements being checked against the rules of the language
Code generation
Produces a machine code equivalent of the source program
Code optimisation
Redundant commands are removed form the code
(I.e uncalled subroutines and functions)
Speeds up compilation time