KEMBAR78
AS CS Notes | PDF | Operating System | Computer Network
0% found this document useful (0 votes)
6 views28 pages

AS CS Notes

The document provides detailed notes on computer architecture, processor types, memory management, operating systems, and databases. It covers the structure and function of processors, including buses, registers, and performance factors, as well as the differences between CISC and RISC processors. Additionally, it discusses various operating system functions, types of storage, and database structures, highlighting the importance of efficient data management and processing.

Uploaded by

mohit.reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views28 pages

AS CS Notes

The document provides detailed notes on computer architecture, processor types, memory management, operating systems, and databases. It covers the structure and function of processors, including buses, registers, and performance factors, as well as the differences between CISC and RISC processors. Additionally, it discusses various operating system functions, types of storage, and database structures, highlighting the importance of efficient data management and processing.

Uploaded by

mohit.reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

AS Computer Science

Notes

1.1.1 Structure and Function of the Processor:

 Control Bus – A bi-directional bus that transmits control signals from the
CU to other parts of the processor and is used to FDE cycle.
 Data Bus – A bi-directional bus that carries data from one place to another.
 Address Bus – A unidirectional bus that carries the address to which data is
sent to or to be received from.
 PC:
o Stores the address of the next instruction to be processed
o This value is then sent to the MAR
o After this the PC is incremented
 MAR:
o Contains the address of the instruction to be accessed in the
memory
 … that has been sent from the PC
o Contains the address of the data to be accessed in the memory
 … that has been sent from the CIR
 MDR:
o Contains the instruction which has been accessed from the memory.
o Or contains data which has been accessed from the memory
o That is referenced by the MAR / Instruction sent to CIR
o It acts as a buffer
 Accumulator:
o Temporary storage
o For data being processed during calculations
o It is used as a buffer
 … for I/O in the processor
 Current Instruction Register:
o Holds the current instruction being executed by the processor,
divided up into opcode and operand.
 Control Unit (CU):
o Decodes Instructions
o Sends control signals to coordinate movement of data through the
processor.
o Controls buses
 Arithmetic Logic Unit (ALU):
o Performs arithmetic and logical operations.
 CPU Performance:
o Greater Clock Speed:
 Gives more cycles per second
 So more instructions can be executed per second
 So the program takes less time to run

o Increased Cache Size:


 More space for data/instructions in cache memory
 RAM needs to be accessed less frequently
 Accessing cache is quicker than accessing the RAM
o Greater Number of Cores:
 A computer with multiple cores can complete multiple FDE
cycles simultaneously.
 A computer with dual cores can theoretically complete tasks
twice as fast as a computer with a single core.
 Not all programs are able to utilise multiple cores efficiently,
so a difference is not always noticed.
 FDE Cycle:
o Fetch:
 The address from the PC is copied to the MAR
 PC is incremented by 1
 Data in MAR is passed onto the Address Bus
 Read signal is sent onto the control bus
 RAM copied the data from the location specified by the
address bus onto the data bus
 Data on the data bus is passed into the MDR
 Data is copied from the MDR to the CIR
o Decode:
 The contents of the CIR are split into operand and opcode.
o Execute:
 The decoded instruction is executed (opcode is carried out on
the operand)
 Von Neumann Architecture:
o Single control unit
o One instruction at a time
o Uses FDE cycle
o Program and data are stored together
 Harvard Architecture:
o Data and Instructions stored separately
o Quicker processing as data and instructions fetched in parallel
o Memories can be different sizes, which can make more efficient use
of space
 Contemporary Processing:
o Combination of Von Neumann and Harvard Architectures
o Cache is Harvard, whereas main memory is Von Neumann

Advantages of Von Neumann Advantages of Harvard


Architecture Architecture
Cheaper to develop as the control Quicker execution as data and
unit is easier to design instructions can be fetched in
parallel
Programs can be optimised in size Memories can be different sizes,
which can make more efficient use
of space
Harvard is generally used for embedded systems.

1.1.2 Types of Processor:

 CISC Processors:
o Each instruction takes multiple cycles
o Single register set
o Instructions have a variable format
o Many addressing modes are available
o Complicated Processor design
o More expensive
 RISC Processors:
o An instruction performs a simple task
o Limited number of instructions available
o Complex tasks can only be performed by combining multiple
instructions
o Simple processor design
o Programs run faster due to simpler instructions
 CISC vs RISC:
o CISC is more complex than RISC
o RISC requires more RAM than CISC
o CISC uses many address modes whereas RISC doesn’t
o CISC may have more registers than RISC
o A RISC instruction takes 1 cycle to complete, whereas a CISC
instruction may require multiple cycles.
o RISC requires a fixed number of bytes whereas CISC has variable
requirements.
 Multi-Core Systems:
o Multi-Core CPUs have multiple independent cores that can complete
instructions separately which results in higher performance.
 Parallel Systems:
o Parallel processing will allow multiple separate jobs/instructions/FDE
cycles to run concurrently
o Longer jobs can be split, shortening the overall time taken
o Different CPUs/cores can tackle different
frames/sections/components of the task.
1.1.3 Input, Output and Storage

 Read Only Memory (ROM):


o ROM is non-volatile
o ROM is quick to start up so a system stored on it can be started up
quickly.
o ROM cannot be altered so there is no chance of the OS being
accidentally or maliciously changed.
 Random Access Memory (RAM):
o Fast main memory used to store user files / software / OS currently
in use
o RAM is volatile
 RAM vs ROM:
o RAM is volatile whereas ROM is not
o RAM is editable whereas ROM is not
o RAM is generally larger than ROM
 Virtual Storage:
o Storing information remotely so it can be accessed by any computer
with access e.g. cloud storage.
o Virtual Storage is convenient to access and share, and the user does
not need to worry about backups and protection.
o However, performance varies on user’s network speeds. Also, the
user cannot do anything if data is lost and must trust another
company with security and backups.
 Look at PMT for the rest – Input, Output and Storage Devices
1.2.1 Operating Systems

 Operating Systems (OS):


o A collection of programs that work together to provide an interface
between the user and the computer.
o They enable the user to communicate with the computer and
perform certain low-level tasks involving the management of
computer memory and resources.
 To provide a User Interface
 Provide System Security
 Manage Hardware
 Provide Utilities
 Provide a platform from which software can be run
 Schedule jobs
 Handle interrupts
 Manage Memory
 Memory Management:
o Organises the main memory
o … by converting logical addresses to physical addresses
o Allows programs to share memory
o … and protect programs from each other
o Allows programs larger than the main memory to run
 Paging:
o Partitioning the memory
o Into pages that are of a fixed size
o Pages are physical divisions
o Used for virtual memory
 Segmentation:
o Parts of a program are divided into unequal sizes
o Using logical divisions
 Virtual Memory:
o Uses a section of secondary storage to act as the RAM when the
space in the RAM is insufficient.
o Sections of programs not currently in use are temporarily moved
into virtual memory through paging, freeing up memory for other
programs in the RAM.
o In order to access a file, it is moved from the secondary storage to
the RAM, where it can then be directly accessed by the processor.
 Interrupt Handling:
o The current FDE cycle is completed
o Check the priority of the incoming interrupt
o If the interrupt queue has an interrupt that is of greater priority than
the current task
o The contents of the registers are stored in the memory
o … in a stack
o The relevant interrupt service routine is loaded
o … By loading the relevant value into the PC
o When the ISR is complete, the interrupt queue is checked for any
interrupts of a higher priority than the previous task being
executed.
o If there are none, then the previous state is popped from the stack
o … and is loaded back into the register
 Scheduling:
o Enables as many jobs to be processed as possible
o … In the least possible time
o Ensuring efficient use of resourced
o Ensuring all jobs are processed fairly
 Round Robin:
o Each job gets a fixed time slice
 First Come First Served:
o The first job to arrive is processed until completion, and then the
next …
 Shortest Job First:
o The quickest to complete is finished first, and then the next …
 Shortest Remaining Time:
o Quickest job is completed first, but after it has been completed, the
remaining amount of time for the rest of the jobs is reevaluated
when a new job arrives.
 Multi-Level Feedback Queue:
o Jobs are put into different queues depending on their importance.
 Distributed OS:
o Allows multiple computers / resources
o … to work on the same problem
 Embedded OS:
o Built to perform a small range of specific tasks
o OS catered towards a specific device
o Limited functionality and hard to update
o Consume less power
 Multi Tasking OS:
o Let the user carry out task seemingly simultaneously
o Using time slicing to quickly switch between programs and
applications in memory
 Multi-User OS:
o Multiple users use the same computer.
o A scheduling algorithm ensures that processor time is shared fairly
between jobs
 Real Time OS:
o A system which gives a response in a guaranteed time frame
 Basic Input Output System (BIOS):
o 1st program that runs when a computer system is switched on
o Performs checks before the OS is loaded onto the RAM
o POST (Power-on self test) – Ensures that all hardware is correctly
connected and functional
o Checks that the CPU clock, memory and processor is operational
o Tests for external memory devices connected to the computer
o The Bootstrap/bootloader is the program that loads the OS from the
secondary storage onto the RAM. It is part of the BIOS.

 Hardware Drivers:
o Enables communication between the OS and peripherals
o To configure hardware
o E.g. would be used to install a new printer
 Device Drivers:
o
 Virtual Machine:
o A theoretical computer which provides
o … an environment in which a translator is available
o Using the interpreter to run the intermediate code
1.2.2 Applications Generation

 UtilitySoftware:
o A utility performs a specific task
o … and is usually related to the upkeep of the system
o Examples of a utility include antivirus software and a disk
defragmenter.
 Disk Defragmenter:
o To keep optimal R/W speed for HDD
 File Management:
o To allow easy access to her file system
 Disk Drivers:
o To allow her to use new peripheral devices
 System Clean-up:
o To keep her system free of redundant files
 Anti-Virus/Malware:
o To find and remove/quarantine viruses/malware
 File Handlers:
o Manages / Organises data storage
o Used for deletion/sorting/moving/copying/ creation of files/folders
o Manage the storage of software
o Manage the storage of stock files
o To access files
 Backup Utility:
o Automatically makes a copy of files
o Storing them in a different location
o In case of loss/corruption of the original
o To make incremental back-ups
o Ensure that specific “example of data” is backed up
 Open Source Software:
o Source code is freely available to use
o … and others to amend/ examine / recompile
 Closed Source Software:
o Requires the user to hold an appropriate licence to use it.
o Users cannot access the source code as the company owns the
copyright licence
 Open Source vs Closed Source:
o Open source can be modified by anyone and even sold on, with
technical support often coming from an online community.
o However, the support available online may be insufficient or
incorrect and there are likely to be no user manuals. There is also
lower security as the code may not be developed in a secure
environment.
o Closed source ensures thorough, regular and well-tested updates as
company’s reputation depends on this. The company will provide
expert support and there are higher levels of security as it is
developed in a secure environment.
o However, users cannot modify the software to suit their own needs.
 Translators:
o A translator is used to convert code from one language to another
o … from source code to object code
o E.g. Compiler, Interpreter, Assembler
 Compiler:
o Some less used architectures may not be developed for as not
commercially viable.
o Compiled code will run quicker than other options
o Easier to get access to lower level features such as GPU access
o Compiled code is not readable for humans, helping to protect
intellectual property
 Interpreter:
o The slow speed may be frustrating
o … though no user interaction is needed which may be a trade off
worth making
o Source code is visible (though can be obfuscated) meaning it can
easily be copied and amended.
o x
 Assembler:
o Assembly code is a low-level language that is platform specific as
the instructions used are dependent on the processor.
o Assemblers translate assembly code into machine code.
 CSS:
o To define the formatting of a webpage
o To change the formatting of a webpage depending on device
o To give a consistent look on every page
o Give example from site

 Intermediate code:
 Is simplified code that…
 …is between high level & machine code
 …is produced by compiler
 …runs on any computer
 …allows portability between machines
 Allows sections of code to be written in different languages…
 …by different programmers
 …suitable for specific tasks
 Error free
 Virtual machine:
 A theoretical computer which provides…
 …an environment in which a translator is available
 Uses an interpreter to run the intermediate code
 Points in the context:
 A translator is used to convert code from one language to another…
 …from source code to object code
 Mention of types of translator: compilers, interpreters, assemblers

 VM:
1.3.1 Databases:

 Relational Databases:
o An entity is an item of interest about which information is stored.
o A relational database is a database which recognises the differences
between entities by creating different tables for each entity.
o
o Relational databases allows for less redundancy od fata
o Relational databases improve the consistency of data
o Relational databases allow for complex queries and or searches to
be performed
 Flat File Database:
o A flat file is a database that consists of a single file. The flat file will
most likely be based around a single entity and its attributes.
 Primary Key:
o A field that has a unique value / identifier
o For every record in that table
o Give an example relevant to question
 Foreign Key:
o An attribute that links 2 tables together.
o The foreign key will exist in one table as a primary key and another
as a foreign key.
 Secondary Key:
o Allows a database to be searched quickly.
 Check PMT for Rest

1.3.2 Networks

 LAN:
o Local Area Network
o A group of computers/devices
o … connected over a small geographical area
o That uses hard-wiring or a wireless connection
o The infrastructure is usually owned by the network owner
 WAN:
o Wide Area Network
o Collection of connected computers over a large geographical area
o That uses third-party connections
 Router:
o A device that passes data between 2 networks
 Gateway:
o A device that connects dissimilar networks to each other
 Protocol:
o A set of rules
o … to govern data transmission between devices
o They are important because:
 They allow devices to communicate
 By ensuring that all devices follow the same rules
 So they interpret signals in the same way
 Packet Switching:
o Data is split into chunks called packets
o Which have labels
o Including the destination address and order
o Each packet is sent on the most convenient route
o Route can be changed at each node
o Meaning they may arrive at the destination in the wrong order
o Once all packets arrive at the receiver, they are reordered
Advantages Disadvantages
Multiple methods to ensure data Time is spent deconstructing and
arrives intact e.g. checksums and reconstructing the data packets
cyclic redundancy tests
Multiple routes can be used between Must wait for all packets t arrive
devices, so if one path breaks, before data can be received
another can be used.
Packets can be transferred over very
large networks to allow global
communication

 Circuit Switching:
o A direct link is formed between two devices
o This link is maintained for the entire conversation between the
devices
o Circuit switching requires the two devices to transfer and receive
data at the same rate.

Advantages Disadvantages
Data arrives in a logical order which Bandwidth is wasted during periods of
results in a quicker reconstruction of time when no data is being sent
data
Enables two users to hold a call Devices must transfer and receive
without delay in speech data at the same rate
Using switches means that electrical
interference can be produced which
can corrupt or destroy data
Ties up sections of the network which
cannot be used by others’ data until
transmission has been completed

 Advantages of Packet Switching over Circuit Switching:


o Transmission is safer from interception
o … because it is impossible to intercept all the packets as they use
different routes
o Very efficient use of network
o … as each channel is only used for a short time / does not tie up
part of the network
o If there is an error, only a small, identifiable part of the data is
affected
o … which can be easily retransmitted
 TCP/IP stack:
o Transmission Control Protocol / Internet Protocol
o Application Layer – Specifies what protocol is to be used in
order to relate the application that’s being sent.
o Transport Layer – Uses TCP to establish a connection
between the 2 devices. It then splits up data into packets
and labels these packets with necessary information. If any
packets are lost, the transport layer requests
retransmission.
o Internet Layer – Adds the source and destination IP
addresses. The combination of the IP address and the port
number is called a socket address. Routers operate on the
internet layer to forward packets.
o Network Interface / Data Link Layer – This is the connection
between the devices, and it adds the MAC address
identifying the NIC cards of the source and destination
computers.
o This is a stack, on the recipients they go from bottom to
top, but vice versa for the sender’s computer.
 DNS:
o The Domain Name System is used to name an organise internet
resources. It is a hierarchy, in which each smaller domain is
separated to form the larger domain by a full stop.
o Domain names are much easier to remember than IP addresses,
which is why they are used to link servers across the world. The role
of the DNS is to translate these domain names into IP addresses
when we wish to access a website.
 Peer-to-peer:
o Devices on the network have equal status/ no central server
o Devices on the network share data

 Client-Server:
o The network consists of clients that are connected to a central
server which holds all the important information and resources on
the system. Clients request to use the server.
DNS
The DNS is used to resolve IP corresponding to URL
Request is sent to the DNS server
The resolver checks its cache, and if it doesn’t hold the URL, it passes it in to the
TLD Name server which checks its cache and returns the answer or passes onto
the
.. Authoritative Name Server
The IP address is then returned back up to the requesting client
Or an error is returned if the URL is not found.
1.3.3 Web Technologies
1.4.1 Data Types
1.4.2 Data Structures

 Array:
o A static data structure
o … Meaning its size cannot change during processing
o All elements must be of the same data type
o Items are stored contiguously
o Array[i] for a 1D array
o Array[i,j] for a 2D array
 Record:
o A row of a file consisting of fields.
o Used in databases

 List:
o A dynamic data structure
o … Meaning its size can change during processing
o Elements can be of different data types
o Items are stored non-contiguously
 Tuple:
o An immutable data structure
o (Initialised using normal brackets)
o Accessed the same way as lists
 Queue:
o FIFO (First In First Out) data structure
o Data is retrieved in the order it is stored
o Data is added to the end
o Dynamic Structure
o … Expands to take in more data

 Stack:
o LIFO (Last In First Out) data structure
o Data is retrieved from the top of the stack
o Data is added the to the top of the stack
o Static Structure
o … Size cannot be changes during processing
1.4.3 Boolean Algebra
1.5.1 Computing Related Legislation

 Data Protection Act 1998:


o The customer has the right to see all data stored on them and to
ask for it to be corrected so that they are not responsible for
incorrect data
o Data must be lawfully collected so that customer rights are not
flouted
o Data can only be accessed/modified by authorised people to avoid
malicious alterations
o Authorised people must be notified to the DPR (Data Protection
Representative) so that they are not accountable
o Data is only used for the specified purpose so that junk mail is not
encouraged
o Data collected should not be excessive so that irrelevant data is not
stored
o Data must be accurate and up to date to prevent mistakes from
happening
o Data should not be kept longer than necessary so that customers
can leave an organisation
o Data should be protected with adequate security measures so that
people with malicious intent cannot gain access
o Data should not be transferred outside of the EU so that data
remains subject to DPA
o Ensure that only relevant data is stored
o Ensure that data is kept up to date
o Ensure that data is accurate
o Data must not be held longer than necessary
o Subjects are given access to all data stored about them
o Data must be kept securely
o Data cannot be passed on to 3rd parties without permission
o Data must not be passed outside of the EU
 The Computer Misuse Act 1990:
o Unauthorised access to computer materials
o Unauthorised access with intent to commit further offences
o Unauthorised modification of computer material
 The Copyright, Design and Patent Act 1988:
o If a work is original, copyright automatically applies and doesn’t
expire until 25-70 years after the creator’s death
o In 1992, the act was extended to include computer programs
o If an individual believes their work has been copied, it is their
responsibility to take action under the Act
 The Regulation of Investigatory Powers Act 2000:
o Covers investigation, surveillance and interception of
communication by public bodies.
o Enforces ISPs and mobile phone companies to give up information
upon request from an authorised authority and ensure their
networks have sufficient hardware installed to facilitate
surveillance.

1.5.2 Ethical, Moral and Cultural Issues

 Computers in the Workforce – Has Come Up


 Automated decision Making -
 Artificial Intelligence
 Environmental Effects
 Censorship and the Internet
 Monitor Behaviour
 Analyse Personal Information
 Piracy and Offensive Communications
 Layout, Colour Paradigms and Character Sets

You might also like