Chapter 5 Flashcards
Why is an OS (operating system) needed?
▪ Provides the environment (software platform) in which other programs can be run.
▪ Provides a user interface between user and hardware: the user can interact/communicate with the machine.
▪ Hides complexity of hardware from user.
(The hardware is unusable without an OS)
Examples of operating systems:
▪ Windows ▪ MAC OS X (Apple MACs) ▪ Android OS ▪ iOS (iPhone/iPad) ▪ MS-DOS ▪ Google Chrome OS (based on Linux) ▪ Linux ▪ UNIX
What does the user interface/human computer interface (HCI) provide?
▪ Controls communications between user and hardware: makes navigation around the system easier.
▪ Provides facility for user inputting data
▪ Provides facility for outputting to the user
▪ User interface can be either Command Line Interface (CLI) or Graphical User Interface (GUI) (or menu-driven).
What is the Graphical User Interface (GUI)?
▪ Previously known as WIMP – Windows, Icons, Menu and Pointing device.
▪ The user interacts with icons (pictures or symbols), through a mouse, keyboard or touchscreen.
What is the Commnad Line Interface (CLI)?
▪ Provides a method of interaction that is non-graphical.
▪ A text-only service with feedback from the OS appearing in text.
▪ Requires knowledge of the written commands available on a particular machine. Instructions must be typed exactly with no errors.
What are the advantages of using CLI?
o The user is in direct communication with the computer.
o A faster way to get tasks done.
o More flexible than a GUI.
o Uses less memory (on the disk and in RAM).
o Some games, such as Minecraft, also make use of a command line tool: allows the user to bypass the main interface and alter the game’s mechanics or environment.
What are the tasks of the operating system?
Memory Management Security Management File Management Process Management Hardware Management Interrupt Handling Provides a User Interface Provides a Software Platform
How does the OS manage memory?
Ensures that two programs do not try to use the same space.
(memory optimisation)
1. Allocates and deallocates RAM to programs.
2. Keeps track of allocated and free memory locations: determines where the programs are stored.
3. Swaps data to and from the hard drive.
(memory organisation)
4. Determines how much memory is allocated to a program and how it can be split up in the most appropriate & efficient way by:
- Handles virtual memory
- Paging // segmentation
5. Memory protection, preventing a process accessing memory not allocated to it.
Paged memory
Memory is split up into blocks of a fixed size and memory management then allocates a partition to an application.
Segmented memory
Memory is split up into blocks of size that can vary.
Virtual Memory
Storage mechanism which offers user an illusion of having a very big main memory.
It is done by treating a part of secondary memory as the main memory.
It enables a computer to be able to compensate shortages of physical memory by transferring pages of data from random access memory to disk storage. This process is done temporarily and is designed to work as a combination of RAM and space on the hard disk.
How does the OS manage files (secondary storage)?
Maintains directory structures // Provides file naming conventions // Controls access.
- Maintaining the directory structures
- Specifies tasks that can be performed on a file (e.g. open, close, delete, copy, create, move etc.)
- Defining file naming conventions which can be used (filename.extension)
- Controls access rights to files, password protection, making file sharing possible
- Specifies the logical method of file storage (e.g. FAT or NTFS, depending on the type of disk formatter that is used)
- Ensuring memory allocation to particular files
How does the OS manage hardware?
▪ Controls access to all input/output devices connected to a computer.
It is made up of sub-management systems like printer management: controls queues and buffers.
- Communicating with all input and output devices using device drivers.
- Translating data from a file defined by the OS, into a formed that the input/output device can understand using device drivers.
- Ensuring each hardware resource has a priority so that it can be used and released as required.
For example how does the OS manage a printer?
▪ Installs printer driver (locates and loads it into memory).
▪ Sends data to the printer buffer to print. If printer is busy or the print job has a low priority, it sends documents to the print queue.
▪ Sends commands to printer throughout the printing process.
▪ Receives and handles error messages and interrupts from the printer.
How does the OS manage processes?
▪ Allocates resources and permits the sharing and exchange of data: allows all the processes to be fully synchronised.
▪ Manages the scheduling of process.
▪ Allowing multi-tasking.
▪ Manages the resources the processes need.
▪ Enables processes to share information.
▪ Prevents interference between processes.
How does the OS manage security?
Ensuring the integrity, privacy and availability of data:
o Provides recovery (and system restore) when data is lost.
o Maintains access rights for users.
o Setting up user accounts (to prevent users entering ‘private areas’).
o Checks usernames and passwords (authentication).
o Provides automatic backup.
o Carriesout OS updates.
o Ensures antivirus software is always up-to-date.
o Communicates with firewall to check all traffic to and form the computer.
o Helps to prevent illegal/unauthorised access (ensuring the privacy of data).
How does the OS handle interrupts?
▪ Identifies priorities of interrupts.
▪ Saves data on power outage.
▪ Loads appropriate Interrupt Service Routine (ISR).
▪ Stops the execution of the current process.
▪ Stores the values of the current process on the stack.
Examples of utility softwares:
o Hard disk formatter o Virus checker o Defragmentation software o Disk contents analysis/repair software o File compression o Back-up software o Firewall o System Clean up
How does the OS format the hard disk?
▪ Prepares the disk for initial use. Prepares it to allow data/files to be stored and retrieved.
▪ Organises storage space by assigning it to data blocks, called partitions. The drive is partitioned into logical drives.
▪ Sets up the specified file system in order to be able to format the partitions.
o Writing files which will hold directory data and table of contents at the beginning of each partition ➔ the OS recognises a file and know where to find it on the disk surface.
▪ May check for errors on the disk
o Finding bad sector errors – these sectors are flagged as ‘bad’ and replaced by unused sectors.
o Bad sectors can be classified into hard (difficult to repair) or soft.
- Hard: e.g.: caused by manufacturing errors
- Soft: e.g.: sudden loss of power leading to data corruption in some of the sectors
What does a virus checker do?
Provides defence against malware.
o Check software/files before they are run/loaded.
o Compare possible viruses against a database of known viruses.
o Carry out heuristic checking.
- Checking software behaviour that could indicate a possible error.
- Put files/programs which may be infected into quarantine to delete the virus or allow the user to decide.