You are on page 1of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.

Past Papers Answers:

Section 3.1: The Functions of Operating Systems


May/June 2000 Oct/NOV 2000 May/June 2001 Oct/NOV 2001 May/June 2002 Oct/NOV 2002 May/June 2003 9. - Current cycle is completed - Priority of interrupt compared with current job If higher: - Contents of special registers saved/job placed in blocked state/in ready Q - Interrupt/program for execution of interrupt, is identified/vectored interrupt used - Interrupt serviced by running program - On completion values of special registers from original program area replaced/original job restored If lower: - Interrupt allocated position in job queue... - According to priorities - Current job continues with next cycle (1 per -, max 6) Oct/NOV 2003 9. (a) - Jobs sent to storage - When storage of job complete - reference to job stored in spool queue - along with location in storage. (1 per -, max 3) (b) - Processor can only process one job at a time - Two types of job, I/O bound and processor bound - I/O must have priority in order to - allow peripherals to operate while processor bound job is processed (1 per -, max 3) May/June 2004 5. (a) Maximise the use of the computer system Be fair to all users Provide a reasonable response time to all users Prevent system failure due to overloading Provide consistency to users (1 per point, max 3)

(6)

(3)

(3)

(3)

http://sites.google.com/site/computing9691/
Page 1 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

(b)

(c)

First come/first served First to enter ready Q is first to enter running state Favours long jobs Shortest job first Jobs in ready Q are in order, shortest job first Means that jobs are seen to be completed but favours shorter jobs Round Robin Each job given time slice When time slice over, job goes to back of ready Q Shortest remaining time The job that requires the least job to complete is done first Long jobs may never be started Multi-level feedback queues Queues with different priorities Jobs can change Q dependent on amount of time already given (2 per type, max 2 types, max 4) (Each job given separate priority according to:) importance of job/type of job amount of time already waited size of job amount of peripheral time (I/O job high priority) Amount of processor time already given Necessary response time (1 per point, max 5)

(4)

(5)

Oct/NOV 2004 3. (i) As jobs and files are loaded into memory they occupy space which when vacated leaves gaps in memory If a larger file is sent to that area and others It has to be broken up to fit This splitting of available memory into discontiguous pieces is called fragmentation (1 per point, max 3) (3) (ii) Memory is divided into regular sized areas called pages Jobs or files are allocated a number of pages according to size of job Pages may be discontinuous Index of pages/files kept Addresses can be calculated by adding page address to raw address (1 per point, max 3) (3) (iii) Memory is divided into variable length blocks called segments Jobs or files can consist of many segments, different number each time taken into memory Segments normally match natural divide in jobs Index of segments stored which must Store base address and length of segment (1 per point, max 3) (3)

http://sites.google.com/site/computing9691/
Page 2 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

(iv)

A whole job does not need to be resident in memory at the same time When a new page is required it is loaded into memory over a redundant page from a reserved area of the hard drive User believes whole job in memory simultaneously Erased page may need to be saved first if it has been altered Use of cache memory Problem of threshing (1 per point, max 3) (3)

May/June 2005 Oct/NOV 2005 5. (a) Signal indicating that a device/program requires attention/seeks attention of CPU/processor/OS [1] (b) (i) -Interrupt generated at fixed intervals -to allow for display refresh -to control access to processor in multi access system (ii) -Interrupt generated by request of hardware -(at extreme) to close down safely in the event of power failure -to pass message for servicing request/printer out of paper (1 per -, max 2 per dotty, max 4) [4] (c) -Programs may be in modular form (i) -Calculates the address of the individual module -Ensures jump instruction from module to module properly addressed (ii) -Decides whereabouts to place program/modules in memory -Adjusts memory addresses according to where placed -Copies program from store to memory (1 per -, max 4) [4] May/June 2006 9. (a) (i) - used when there is not enough memory available - part of the storage is allocated to act as memory - this block is then imported to memory when it is needed - especially used when a piece of software is so big that it will not fit into memory (1 per -, max 2) [2] - the division of memory into fixed size units - logical pages can then be assigned to any physical page in memory - records of the contents of each page in memory are kept in an index (1 per-, max 2) [2] - the division of software into logical parts which are of different sizes - individual segments can be present in memory without the need for the whole program to be there - an index is required to store the beginning, size and contents of each segment - leads to fractionalisation of the memory (1 per -, max 2) [2] - temporary storage of - input or output data - on some form of backing storage (1 per -, max 2) [2]

(ii)

(iii)

(b)

(i)

http://sites.google.com/site/computing9691/
Page 3 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

(ii)

- jobs are stored on backing store - with reference to the job and its location stored on a spool/print queue - the jobs in the spool queue can be prioritized and - the job reference can enter the queue at a position according to its priority (1 per -, max 3) [3]

Oct/NOV 2006 9. (a) -a number of jobs will want to be run at the same time -processor can only run one job at a time -in order that the jobs are treated fairly -the operating system has to have rules to determine the order of execution/make maximum use of resources (1 per , max 2) (2) (b) -order of jobs according to list of priorities -each job allocated priority according to -importance/time already spent on job/need for peripheral devices -jobs can be in any of three states: ready, running or blocked -Ready Q contains list of jobs waiting for processing in the order in which they should be processed -HLS handles ready Q and loads jobs -MLS handles the swapping of data between memory and storage -LLS moves jobs in and out of running state -preemptive scheduler has control over what is in running state, non-preemptive simply follows the Q (1 per -, max 5) (5) May/June 2007 1. (b) - HCI - Type/to allow communication - Utility programs - Routines that the OS makes available to the user/example - Hardware control/Input and Output - Software routines to control the hardware/device drivers - Multi tasking capability - allows different Windows/user can carry on more than one task at a time - Spooling - to queue jobs for input/printing/.. - Security - to ensure that different users can keep files confidential - Host software - scheduler to schedule instructions - Memory management - to allocate memory to data/software - Interrupt handling - to schedule jobs through the system - Translators - to produce object code (1 per -, max 2 pairs, max 4) [4]

http://sites.google.com/site/computing9691/
Page 4 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

Oct/NOV 2007 5. (a) I/O interrupt printer out of paper or not connected Timer interrupt processor has used too much time on one process/do something else time share system Hardware power failure/allow I/O interrupt example Software invalid instruction attempted/division by zero (1 per , max 2 pairs, max 4) (b) Present cycle completed Priority of interrupt compared with priority of present task If lower priority then stored in job queue in relevant position for its priority (If higher) then contents of registers stored on stack Interrupt routine found and run When complete, next highest priority run Mention/description of vectored interrupts (1 per , max 5)

[4]

[5]

May/June 2008 8. (a) -When more than one program resident... -and requiring processing... -the operating system uses scheduling to decide on processing to be done -Allocation of processing... -in a multi-access/multi programming environment -to be fair to all programs/users -to use the peripherals wisely -to prevent system failure -maximise use of processor (1 per -, max 2) [2] -FCFS/first job to enter ready queue is first to enter running queue/favours long jobs -SJF/sort jobs into time expected to run, shortest first/new jobs place in queue in correct order -RR/gives time slice to each job in turn/after slice job returns to back of queue -SRT/jobs sorted according to run time left to do/long jobs may never be done -MLQ/involves a number of queues/jobs migrate through the queues according to importance -PD (peripheral dependency)/non peripheral dependent jobs given low priority (2 per -, max 3-, max 6) [6]

(b)

http://sites.google.com/site/computing9691/
Page 5 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

Oct/NOV 2008 6. (i) Memory divided into fixed sized units IAS is organised into physical pages Jobs/Data are divided into page sized pieces O.S. keeps an index of which jobs/data are in which pages Pages requiring processing need to be in memory Address may be in form of page and distance from start of page (ii) Jobs/Data are divided up into logical amounts each of which is of a different size Memory tends to become fractured leading to compaction of memory being necessary Address complicated by need to calculate from start of segment (iii) Used when not enough space in memory Part of backing store used as though it were memory Contents must be copied to memory to be used Previous contents must be saved first Too much use of virtual memory leads to disk threshing (1 per , max 3 per dotty, max 9) May/June 2009 9.

[9]

-Interrupt given a priority -Placed in queue with other interrupts to be done -according to priority. -When it becomes the highest priority interrupt it is dealt with -Contents of special registers are placed on a stack/saved -Interrupt (and others) dealt with -values read from stack into special registers. -Check for interrupt(s) at end of each cycle before fetching next instruction -Vectored interrupts (1 per -, max 6) [6]

Oct/NOV 2009. P31 9. (a) (i) Only one user has access at a time. [1] (ii) -Application Programming Interface -provides platform to run software -file management -manipulation of files -memory management -paging/virtual memory/scheduling -processor management -interrupt handling/scheduling -I/O management / handles data transfers -between areas of processor/between primary memory and secondary storage. -device drivers / handles data between processor and I/O peripherals -using instructions in device drivers and control of buffers - user interface -a method of communicating with computer/suitable example -Utility software
http://sites.google.com/site/computing9691/
Page 6 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

-offers series of software to carry out housekeeping/monitor and maintain and use the hardware. -Security/privacy -will protect data by copying to other media automatically/sets up passwords to restrict access to files. (1 per -, max 2 components, max 4) [4] Oct/NOV 2009. P32 8. Scheduling is used to provide an algorithm to be followed which... determines the order in which jobs are selected and length of time to be processed. e.g. of scheduling algorithm. Jobs are rated in importance according to... I/O requirements current length of wait (accept any 2 criteria to max of 2). Job importance dictates position in ready Q relative to other ready jobs Job moved from running to blocked state when waiting on peripheral then returned to ready Q (1 per , max 6) [6]

Oct/NOV 2009. P33 May/June 2010. P31 May/June 2010. P32 6. (a) -Pages are fixed size/rely on physical divisions -Segments are variable size/are based on logical divisions (1 per -, max 2) (b) -Index of pages is maintained... -If an instruction is to be executed it must be in main memory -When page is completed it can be over-written... -by the next page to be accessed... -which may be stored in virtual memory -which allows faster access than simply from storage -Virtual memory is using backing store to act as memory -Page management table... -used to keep track of where in memory the pages are stored -Pointer to next page (1 per -, max 6)

[2]

[6]

May/June 2010. P33 6. (a) -Job is moved into ready queue -Position in queue is determined by priority of job (according to rules laid down by the scheduler) -Part of scheduler which loads jobs into ready queue is called the High Level Scheduler (HLS) -When currently running job leaves running state the job at top of ready queue is loaded into process and run -This is done by the low level scheduler (LLS) -If a job requires peripheral time it is moved to the blocked state to await servicing
http://sites.google.com/site/computing9691/
Page 7 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

-After it has been serviced it must return to the ready queue to await its next turn to use the processor. -The task of moving jobs between the secondary storage and the primary memory is carried out by the medium level scheduler (MLS) (1 per -, max 6) [6] (b) -IO and processor bound jobs give priority to IO bound jobs -FCFS -Round robin or time share systems -Shortest job first -Shortest remaining time -Multi level feedback queues (1 per -, max 2)

[2]

Oct/NOV 2010. P31 5. (a) -Software interrupt... -e.g. generated by the current program/may need to use printer/... -I/O interrupt... -e.g. Initiated by I/O hardware/user pressed a key/... -Timer interrupt... -e.g. end of time slice -Hardware interrupt... -e.g. power off (1 per -, max 2 pairs, max 4) [4] -current process halted -Interrupt given a priority -Placed in queue with other interrupts to be done... -according to priority -When interrupt reaches top of queue it is processed // highest priority is handled first -Contents of registers placed on stack -values read from stack to registers. (1 per -, max 5) [5]

(b)

Oct/NOV 2010. P32 5. (a) -Software interrupt... -e.g. generated by the current program/may need to use printer/... -I/O interrupt... -e.g. Initiated by I/O hardware/user pressed a key/... -Timer interrupt... -e.g. end of time slice -Hardware interrupt... -e.g. power off (1 per -, max 2 pairs, max 4) -current process halted -Interrupt given a priority -Placed in queue with other interrupts to be done... -according to priority

[4]

(b)

http://sites.google.com/site/computing9691/
Page 8 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

-When interrupt reaches top of queue it is processed // highest priority is handled first -Contents of registers placed on stack -values read from stack to registers. (1 per -, max 5) [5] Oct/NOV 2010. P33 5. (i) Memory is divided into variable length segments Programs can consist of many segments Segment size is determined according to logical reasons dictated by the program to beexecuted Segments normally match natural divide in program (ii) Memory/program is divided into fixed sized pages Program is allocated a number of pages according to the size of the program Page size is determined according to physical factors of the way storage is defined Pages may be discontiguous Index of pages kept Addresses can be calculated by adding the page address to base address (iii) A whole program does not need to be resident in memory at the same time When a new page is needed it is loaded into memory over a redundant page from a reserved area of storage Part of storage is required to act as though it were memory Use of cache to act as very fast transfer storage between main storage and memory User believes whole program is stored in memory simultaneously Erased page needs to be stored before being overwritten if it has been altered Problem of thrashing mentioned (1 per , max 4 per dotty, max 9) [9] May/June 2011. P31 5. (a) -Temporarily storing data for output later -several computers can send data to be printed at the same time -when queuing jobs sent to a single device (1 per -, max 2) May/June 2011. P32 5. (a) -Temporarily storing data for output later -several computers can send data to be printed at the same time -when queuing jobs sent to a single device (1 per -, max 2) May/June 2011. P33 5. (a) -Part of secondary storage // hard disk -allocated to be used as if it were main memory -Contents must be transferred to main memory to be used but -provides high speed input to main memory -Description of problem of disk thrashing // data continually having to be loaded to and from the main memory (1 per -, max 2) [2]

[2]

[2]

http://sites.google.com/site/computing9691/
Page 9 of 10

Reinforcement: 05-10 Years' relevant CIE answers. Section 3.1

Oct/NOV 2011. P31 Oct/NOV 2011. P32 Oct/NOV 2011. P33 May/June 2012. P31 May/June 2012. P32 May/June 2012. P33

http://sites.google.com/site/computing9691/
Page 10 of 10

You might also like