1.2.1 systems software Flashcards
What are the functions of an operating system?
- Managing the hardware
- Managing software (secondary storage loading programs in and out of RAM to be executed)
- Provide a user interface (so user can interact with hardware)
- manages system security
- provides a platform for utilities/applications
- manages external devices (efficient comms with devices and manage functionality issues)
- managing the processor/scheduling
- provides a platform for networking and multitasking
- memory management (paging, segmentation and VM)
- handle interrupts
What does an OS provide?(4)
- User interface
- Memory/resource Management
- Interrupt handling
- Processor scheduling
Name 4 common operating systems.
Windows, Android, Linux, iOS
What is the kernel?
- the core of the operating system that provides basic services for all other parts of the OS.
What are the tasks of the kernel?
- Loading and unloading programs from RAM
- CPU scheduling
- Memory management
- Storing files to and from storage
- File management
- Data security
Why do different operating systems have different kernels?
Because different devices have different priorities.
e.g. A kernel for a mobile phone will need to be as power efficient as possible whereas one for a desktop will be optimised for performance
What are device drivers? (think of mr caselton vs bus driver who act as software)
- software installed which enables communication between OS and device so OS can interact with and control it.
- Mr Caselton can drive but can’t use all bus functionality. Bus driver (software) has more capability.
What does a device driver do?
- Translates commands from the OS into series of hardware specific commands that only that device understands. The device can also pass data back to the OS using the device driver.
Device drivers are…
hardware dependent and OS specific
Who makes the driver for a specific device?
The company who created the device.
What is a user interface? What does it contain.
- Software that allows the user to interact with computer’s hardware.
- WIMP (Windows, Icons, Menus, Pointers)
Name two user interfaces.
GUI and CLI
what is a GUI. Give advantages and disadvantages
- graphical user interface
- uses WIMP (Windows, Icons, Menus, Pointers) to provide clear graphical interface for user to control computer.
- visual, interactive and optimised for mouse and touch gesture input
- allows for multitasking
- can take longer to perform tasks
- more resource intensive
- requires more power (more data involved)
What is a CLI. Give advantages and disadvantages
- command line interface
- allows user to type commands directly into the computer.
- more reliable + more control due to direct communication from commands
- requires less power
- hard to use without knowledge of commands. But if experienced, its fast to use
Give 3 examples of utilities.
(utilities help to maintain the computer)
- Print queue
- File management
- Encryption software
- Compression Software
- Antivirus
- Disk defragmenter
What is the job of the memory manager?
- Allocating memory to each program that runs
- Mapping logical addresses to actual physical addresses
- Prevents programs from overwriting each other
- Moving files to virtual memory when running short on RAM
Give two ways that an operating system manages memory.
Paging (Pagination) and Segmentation
Give some similarities about paging and segmentation
- both allow programs to run despite insufficient memory
- pages and segments are stored on disk
- pages and segments are transferred into memory when needed
- Allows programs to be stored in memory non-contiguously
- both are ways of partitioning memory
Give 3 differences about paging and segmentation
- pages = fixed size, segments = different sizes
- pages made to fit section of memory, segments are complete sections of program
- pages are physical divisions but segments are logical divisions
How does segmentation work?
- An application running is split into processes (segments)
- Each segment is a complete section of program that is allocated a space in RAM and executed separately.
- The large program is run by running the smaller segments as required.
What does segmentation do?
- Allows a program to be run on a system without using up too much memory.
what are segments?
- logical divisions of varied sizes
What is the code segment?
A segment which holds the executable instructions for the process.
What is the data segment?
A segment which holds all of the variables for the process.
What is the stack segment?
A segment which holds the memory addresses for the process which is running.
What is the free memory segment?
A segment which allows the stack segment to grow and shrink as necessary.
How does segmentation prevent files from overwriting each other?
All the processes have a set section of memory which is controlled by the OS.
What is virtual memory?
- allocated section of the hard disk which can be used as memory when the memory is full.
- Pages that aren’t needed are moved to VM and moved back to physical memory when required
Why is virtual memory not ideal to use? (why do instruction currently being run have to be on RAM and not on hard disk)
Because the hard disk is much slower than the RAM.
what are pages
- physical divisions of fixed size to fit into sections of memory
- programs split up to fit into a given number of pages
How does paging work?
- RAM split up into numbered pages, each 4MB in size. Then can be assigned to non-contiguous memory locations in RAM
- this method doesn’t take into account how the program is split (it could split looping instruction –> inefficient)
- Pages that have not recently been used can be copied from the RAM into virtual memory to free up space in RAM.
What is disk thrashing and explain the implications?
When more time is spent swapping data (pages/segments) in and out of RAM than on actually processing the data.
- increases amount of time OS spends on management tasks + is witnessed through slowing of operations on computer.
What is a memory leak?
When a program does not flush its used data and so it takes up more and more space the longer it runs.
What will happen if a memory leak is bad enough?
The RAM will be completely full and the system will require restarting to clear the contents of the RAM.
Why is a memory leak less likely to happen to a well written program?
Because a well written program will regularly flush out the used data that it no longer requires, freeing up space in RAM.
What is a stack overflow?
The more memory addresses are used in a process, the more the stack segment expands into the free memory. If the stack segment gets too big, then it overflows, causing the program to crash.
What are the main two ways that the CPU reacts to events?
Polling and interrupts.
How does polling work?
The CPU regularly checks to see if any peripherals or applications require attention.
Why is polling good?
It is very simple and predictable.
Why is polling inefficient?
It uses up CPU processing time waiting for potentially nothing to happen.