A level Computer Science Chapter 5 Flashcards

(44 cards)

1
Q

Explain why a computer system needs and operating system? 4-6 points

A

A computer system requires an operating system because:

The OS controls and manages the hardware resources of the computer, such as the CPU, memory and storage

It provides an interface between the user and the hardware / allows user interaction

The OS manages memory, ensuring programs do not overwrite each other

It controls the execution of programs, including scheduling CPU time

The OS manages input and output devices through device drivers

Without an OS, application software cannot run because there is no way to communicate with the hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Purpose of an operating system?

A

to provide a user interface
to provide a platform for software to run
to hide complexities of hardware from user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the operating system manage?

A
  • memory management
  • file management
  • security management
  • hardware management
  • input/output management
  • process management
  • error checking and recovery
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the memory management do in the operating system?

A

controls the movement of data between RAM/processor
allocates memory to processes
dynamically allocates memory to processes/programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does memory management allocates RAM

A

RAM is assigned into blocks
dynamic allocation of RAM to programs
reclaims unused block of RAM
prevents two programs occupying same area of RAM simultaneously
moves data from secondary storage when needed (manages paging & virtual memory)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does file management work in an operating system?

A

space allocated to particular files
maintains a directory structure
provides file naming abilities
implements access rights
allows file sharing
specifies tasks that can be performed on a file (copy, paste, delete, close…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does security management do in an operating system?

A

creates accounts/passwords
provides firewall or anti-malware
validates user and process authenticity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does hardware management work/what is the role/what does it do

A

receives data from input devices
sends data to output devices
operates/installs device drivers - installs programs for devices connected to external ports
allows communication between peripheral devices and computer
handles buffers for transfer of data - ensures smooth transfer between devices
transmitting and receiving at different speeds
manages interrupts from the device

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the role of process management?

A
  • manages scheduling of processes - decides which process to run next // order of processes
  • manages resources the processes require - e.g. allocating memory
  • enables processes to share/transfer data
  • prevents interference between processes
  • handles process queue
  • supports/allows multitasking - ensures fair access, handling priorities/interrupts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the utility software do?

A

help set-up/optimise/maintain the computer
makes memory allocation more efficient
checks the system for faults

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the types of utility software?

A
  • Disk Formatter
  • Defragmentation
  • Disk Cleanup
  • Compression software
  • Virus Checker
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is defragmentation?

A

Moves/rearranges blocks of files so that each individual file is contiguous memory
Moves free space together
Less time taken to access files (less head movement as data is contiguous)
Improves disk access times - no need to search for next fragment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a program library?

A
  • contains pre-written functions and subroutines
  • can be referenced or imported
  • the functions/routines it has can be called in own program
  • saves time as code does not have to be written from scratch
    more likely to work (it’s already tested)
  • program updates automatically (if update in routine)
    can perform more complex calculations than a programmer can do
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the benefits of Dynamic link library?

A

Dynamic Link Library Benefits
* requires less main memory as DLL is only loaded once when needed
Rock
* executable file is smaller (does not contain all library routines)
* no maintenance needed from programmer (DDL is separate from program)
* no need to recompile program if changes are made to DDL
(changes/improvements to DDL file code are done independently of the main
program)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does a language translator do?

A

Translate high level assebly language program into machine code that can be understood by the computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does an assembler do?

A

Translates assembly code into machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What does compiler do?

A

translate high-level language (entire code is translated then run)
used after the program is completed
produces error report after translating
creates an executable file - can be run without source code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Disadvantadges of compiler?

A

Creates an executable file, which can not be altered when coding.
Errors can not be altered in real time
Code will not run if there is an error.

19
Q

Advantadges of compiler?

A

Makes a report of all the bugs in the code
can debug simultaneously

20
Q

What is interpreter?

A

translate high-level language line by line (is translated then run)
used while writing a program for testing and debugging
errors can be corrected in real time - stops when an error occurs and displays
position

21
Q

Benefit of interpreter

A

allows developer to make real-time changes that can be seen immediately
program can be debugged at each stage
developer can test when incomplete - small parts can be tested individually, if one
section does not work others can still be tested
to avoid dependant errors

22
Q

What is IDE?

A

Software that provides programmers with tools to write, edit, and develop programs ✔

It combines multiple development tools in one application ✔

Typically includes a code editor, compiler/interpreter, and debugger ✔

It helps to increase programmer productivity and reduce errors ✔

23
Q

Benefits of an IDE

A

Coding
* context sensitive prompts - as the code is being written, displays
predictions/options to complete the statements, suggests additions
* auto-complete - helps programmer figure out what to type next
* auto-correct
* dynamic syntax check - underlines/highlights syntax errors as code is being
entered/in real-time
* pretty printing - helps identify key terms
* auto indentation
* expand/collapse code blocks
* single stepping - allows programmer to run the code one line at a time (breaking in between) so effects of each statement on values can be seen/checked
* breakpoints - stop the code executing at a set line (to check current
values/progress)
* report windows - output contents of variables and data structures (see how
variables change)
* variables & expressions

24
Q

What does the disk formatter do?

A

Sets up a disk so it can be used to store files

25
What is Defragmentation?
Rearranges scattered fragmented data on the HDD contigous to eachother so its faster to read/write.
26
What is disk repair?
Disk repair scans the disk for errors and then repairs the disk (HDD)
27
Identify 4 management operating systems that will perform.
- memory management - security management -file management -user interface -input/output management
28
Describe how a program library can be used while writing a computer program.
Program libraries store pre-written functions and routines The program library can be referenced/imported the functions/routines can be called in her own program
29
Describe the ways in which Jennifer can use both a compiler and an interpreter while developing the program.
Interpreter: * Use an interpreter while writing the program * ... to test/debug the partially completed program * ... because errors can be corrected and processing continues from where the execution stopped // errors can be corrected in real time // errors are identified one at a time Compiler: * Use the compiler after the program is complete * ... to create an executable file * Use the compiler to repeatedly test the same (completed) section * ... without having to re-interpret every time // compiler not needed at run- time
30
Identify two debugging tools within an IDE
Breakpoints Single stepping Report windows
31
Describe the file management tasks that an Operating System performs.
Storage space is divided into file allocation units Space is allocated to particular files Maintains / creates directory structures Specifies the logical method of file storage (e.g. FAT or NTFS) Provides file naming conventions Controls access // implements access rights // implements password protection // Makes file sharing possible Specifies tasks that can be performed on a file (e.g. open, close, delete, copy, create, move etc.
32
Identify two different types of software licence that the programmer could use.
Open Source Initiative Free Software Foundation
33
Explain the benefits to the programmer of using program libraries.
Saves (programming/testing) time as code does not have to be written/re-written from scratch // code does not have to be tested Code is already tested so it is more robust/likely to work If there is an improvement in the library routine the program updates automatically can perform complex calculations that the programmer may be unable to do
34
Describe the operation of a compiler.
Attempts to translate the whole source code Creates a separate error report at the end of the translation proces If translation successful / no errors creates an executable file
35
Describe the operation of an interpreter.
Reads each line then translates it and executes it Stops when an error is encountered // displays errors where it finds them
36
Explain how an IDE can help write code.
Enter code into an editor Pretty printing to identify key terms Context-sensitive prompts to help complete statements Expand and collapse code blocks Auto-complete to suggest what to type next Auto-formatting to indent code blocks Dynamic syntax checking
37
Explain how an IDE can help test code.
Single stepping to run the code line by line Breakpoints to stop the code at set points to check values Report window to see how variables change
38
State two benefits of using dynamic library
(main) memory requirements for program are reduced as dynamic link library is loaded only once / when required the executable file size is smaller because the executable does not contain all the library routines maintenance not needed to be done by the programmer because the DLL is separate from the program no need to recompile the main program when changes are made to DLL
39
Describe the ways in which memory management organises and allocates Random Access Memory (RAM).
RAM is assigned into blocks dynamic allocation of RAM to programs / processes reclaims unused blocks of RAM prevents two programs / processes occupying the same area of RAM at the same time moves data from secondary storage when needed // manages paging, segmentation and virtual memory
40
Define the term program library.
Set of pre-written / pre-compiled / pre-tested subroutines ... which can be called in other programs ... by installing/importing the library
41
Describe the term breakpoints in IDE
Stop the code at a specific line to check the current progress / values
42
Describe dynamic syntax checks in IDE
Highlight / underline / colour syntax errors as the code is entered
43
Describe contest-sensitive prompts
Suggest the code to add // automatically complete statements
44
Describe single stepping in IDE
Run the code one line at a time so the values can be checked