Explain why a computer system needs and operating system? 4-6 points
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
Purpose of an operating system?
to provide a user interface
to provide a platform for software to run
to hide complexities of hardware from user
What does the operating system manage?
What does the memory management do in the operating system?
controls the movement of data between RAM/processor
allocates memory to processes
dynamically allocates memory to processes/programs
How does memory management allocates RAM
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 does file management work in an operating system?
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…)
What does security management do in an operating system?
creates accounts/passwords
provides firewall or anti-malware
validates user and process authenticity
How does hardware management work/what is the role/what does it do
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
What is the role of process management?
What does the utility software do?
help set-up/optimise/maintain the computer
makes memory allocation more efficient
checks the system for faults
What are the types of utility software?
What is defragmentation?
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
What is a program library?
What are the benefits of Dynamic link library?
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)
What does a language translator do?
Translate high level assebly language program into machine code that can be understood by the computer
What does an assembler do?
Translates assembly code into machine code
What does compiler do?
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
Disadvantadges of compiler?
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.
Advantadges of compiler?
Makes a report of all the bugs in the code
can debug simultaneously
What is interpreter?
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
Benefit of interpreter
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
What is IDE?
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 ✔
Benefits of an IDE
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
What does the disk formatter do?
Sets up a disk so it can be used to store files