Operating Systems Flashcards

1
Q

Operating Systems

A

Definition: Software that handles the interface to the hardware and manages resources.

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

Features of OS

A

Provide and manage hardware resources. Provide an interface between the user and the machine e.g. CLI, GUI. Provide an interface between applications software and the machine e.g. saving to disk. Provide security for the data on the system e.g. passwords, access rights, encryption. Provide utility software to allow maintenance to be done e.g. housekeeping, anti-virus.

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

Manage HW Resources

A

Management of memory – partitioning, allocating memory, virtual memory. Scheduling of Jobs including interrupt handling.

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

Interrupt

A

An interrupt/signal sent to the processor. Request for processing time. Allows important tasks to be processed. Interrupts may cause a break in execution of the current routine so it can be resumed later.

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

Reasons for interrupts

A

To obtain processor time…for a higher priority task. To avoid delays. To avoid loss of data. As an indicator to the processor… that a device needs to be serviced.

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

Sources of interrupt

A

User e.g. new user logon request, power failure e.g. to allow orderly shut-down (prevent data loss), system failure, peripheral e.g. printer buffer empty, Clock, software e.g. divide by zero error.

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

HW Interrupt

A

A hardware interrupt is an electronic alerting signal sent to the processor from an external device, either a part of the computer itself such as a disk controller or an external peripheral. E.g. imminent power failure.

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

SW Interrupt

A

Software interrupt is an interrupt generated within a processor by executing an instruction. E.g. Divide by zero.

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

Processing interrupts

A

After each cycle is completed (execute instruction) the processor checks the interrupt register by comparing priority of the current task with the highest priority interrupt. If interrupt is of higher priority the contents of registers put on stack …PC set to start address of interrupt service routine…interrupt is processed…check for further interrupts…contents of registers restored from stack and original task continues. If the interrupt was not of a higher priority than the current task then it starts the fetch-execute cycle again (the address of next instruction is copied from the PC to MAR).

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

Resuming after interrupt

A

Reset interrupt request flag so shows interrupt has been serviced. Check interrupt register for further interrupts and service them if they are of higher priority than task to be resumed. If there are no higher priority interrupts then restore the contents of the registers from the stack and resume task.

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

Interrupt priority

A

Interrupts have priorities: To decide between interrupt and current task. To choose which interrupt to process if 2 (or more) occur together. To ensure most urgent task is performed first. To ensure most efficient use of the processor. e.g. new user log on can wait… but data must be saved before power fails.

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

Scheduling

A

The operating system allocates priorities to jobs. Deciding which job to run next is the job of the scheduler.

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

Scheduler Purpose

A

Ensure all jobs are processed changing priorities where necessary. Process as many jobs as possible in the least possible time.
Maximise the number of interactive users receiving fast response times. Maximise throughput by utilising resources and processor time efficiently.

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

Priority

A

An order of importance.

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

Job States

A

Ready, Running and Blocked.

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

Job Queue and Priorities

A

Jobs are given different priorities when in a job queue. This is because some jobs are more urgent than others. Priorities are also used to maximise the use of the computer resources. A job with a low priority can have its priority changed by the operating system.

17
Q

Job Leaving Running State 4 reasons

A

Job may have finished running. Job may require services of a peripheral (placed in the blocked queue to await servicing). Job has had long enough and it has to give up its place so that the other jobs get a chance. A higher priority interrupt comes along.

18
Q

Scheduling Algorithms

A

Round robin, system of priorities, length of job, first come, first served, multi-level feedback queues.

19
Q

Round robin

A

Each user is allocated a time slice. When time slice is up, system moves to next user. If next user needs processor, user given time slice. Repeat this for all users in turn (until all users serviced). Users may have different priorities which can change the order. Time slices are very small with no apparent delay for any user.

20
Q

Memory management

A

Physical and logical division of memory and programs (memory is not disk storage).

21
Q

Why mm is needed

A

To allocate memory to allow separate processes to run apparently simultaneously. To deal with allocation when paging/segmentation. To reallocate when necessary. To protect processes and data from each other. To protect the operating system and provide security. To enable memory to be shared.

22
Q

Virtual memory

A

Virtual memory combines active RAM and inactive memory on secondary storage to form a large range of contiguous addresses. Allows programs to run when there is insufficient memory available.

23
Q

Paging

A

Way of partitioning memory. Used for virtual memory. Segments stored on backing store and assigned to memory when needed. Pages are of a fixed size, they are made to fit sections of memory, they are physical divisions. Paged allocation divides the computer’s primary memory into fixed-size units called page frames, and the program’s address space into pages of the same size.

24
Q

Segmentation

A

Way of partitioning memory. Used for virtual memory. Segments stored on backing store and assigned to memory when needed. Segments are different sizes, complete sections of programs, logical divisions.

25
Q

Segment – Logical unit

A

Logical unit such as: main program , procedure, function, method, object, local variables, global variables, stack, arrays.

26
Q

Disk threshing – problem with VM

A

Occurs when using virtual memory moving pages between memory & disk. Disk is relatively slow. High rate of disk access more time spent swapping pages than on processing - computer may ‘hang’.

27
Q

Spooling

A

Simultaneous Peripheral Operations On-Line. It is a type of buffering. It is used to place input and output on a fast access storage device, such as a disk, so that slow peripheral devices do not hold up the processor.

28
Q

Reasons for spooling

A

It allows sharing of the printer on a network with different users. It avoids delays and frees up the processor. It avoids the speed mismatch between the slow printer and fast processor. It allows jobs to be prioritised.

29
Q

How Print Spooling works

A

Output data to disk drive/storage device for printing at another time. To allow sharing on a network. Job references stored in a queue. Avoids speed mismatch as printers are relatively slow. Jobs can be prioritised. Print Spoolers can notify users when their output has been printed, distribute jobs among several printers and generate banner pages to identify and separate print jobs.

30
Q

Other use of spooling

A

A batch processing system uses spooling to maintain a queue of ready-to-run jobs which can be started as soon as the system has the resources to process them.

31
Q

Boot file

A

A boot file is a computer program executed automatically that loads the main operating system for the computer after completion of the self-tests – POST. It is stored on ROM.

32
Q

Purpose of Boot File

A

Provides personal settings, initialises operating system, passes control to operating system (by setting program counter), checks hardware, checks memory.

33
Q

Booting up

A

The initial set of operations performed after CPU receives power or when the computer is reset. The first step is for the computer to run the Power-On-Self-Test (POST) routine resident in permanent memory. The boot program is stored in ROM and contains the skeleton of the Basic Input/Output System. Control is now passed to the boot program. The boot program instructs the CPU to send signals to check hardware (buses, system clock, memory) and peripherals. The boot program takes account of any personal settings e.g. which operating system to boot. The boot program now reads the operating system into memory and then executes it (by setting Program Counter).

34
Q

Duties of BIOS during POST

A

Verify CPU registers. Find, size, and verify system main memory. Initialize BIOS. Identify, organize, and select which devices are available for booting. Provide a user interface for system’s configuration. BEEP codes to indicate errors.

35
Q

FAT

A

File Allocation Table - a map of where files are stored on the hard disk.

36
Q

FAT – use

A

Is updated by the operating system when files are saved/deleted. Is used by the operating system when files are accessed.

37
Q

FAT – contents

A

Provides addresses/pointers to the start of files. Provides pointers to further clusters (in a chain). Stores file names
Stores file sizes. Stores access rights. Identifies free space.