Computer Technology Theory Flashcards
W2 Describe how the LMC performs the Fetch and execute cycle (8 marks)
W2 Briefly describe how the operating system allows programs to interact with a computers hardware (4 marks)
W6 Describe, using an example, what is a the stack data structure and how/where it can be used in the execution of a program . (6 marks)
W7 Describe, using examples, what is a queue data structure and give two examples of where it may used in operating systems. (6 marks)
W8 Briefly describe the elements of a PCB (4 marks)
W8 Explain the steps a process can undergo as through the job and process scheduler. (8 marks)
W8 Describe the process of context switching as it applies to process control blocks (PCB). (5 marks)
W8 In linux a process is created using the fork() command. Explain the steps that occur if a fork() command is called (8 marks)
W8 The wait () command is another important associated with processes: Explain, using a suitable example, exactly how the wait functions works (10 marks).
W8 The execvp command has the following format:
int execvp(char *prog, char *argv[])
Explain what values are stored in the prog and the argv parameters if the two command line argument are: gcc and file1.c (4 marks)
W8 What is a thread control block (4 marks).
W8 Distinguish between a single and a multi-threading system. (4 marks)
W8 Give two examples of multi-threading (2 marks)
W8 What are the main states that a thread can undergo (8 marks)
W8 To create a thread in posix C programming a number of parameter are required. Explain in your own words what each of the following parameters of the thread function mean:
int pthread_create(pthread_t *tidp, const pthread_attr_t *attr, *start_rtn, void *restrict arg) (8 marks)
W9 Distinguish between concurrent and parallel processing (4 marks)
W9 Explain why it is critical to ensure that concurrency is carefully controlled for processes accessing the same data item; in other words the race problem (8 marks)
W9 The test and set is an algorithm to prevent the race problem. What is the main problem with this algorithm and explain how the wait and signal approach overcomes this problem (6 marks)
W9 What is the bounded buffer also known as the producer/consumer problem? Give an example to illustrate your answer? (4 marks)
W10 Identify and explain the four conditions necessary for Deadlock to occur. (4 Marks)
W10 What are the three ways of preventing deadlock? (4 marks)
W10 What is the relationship between deadlock and starvation. Give two reasons why starvation can occur and how it can be resolved. (4 marks)
Both involve process being unable to proceed, however starvation can occur idenpendly of deadlocks, however deadlocks often leads to starvation.
Priority Scheduling - high priority processess consuming resources. Implement agin to gradually reduce the priority
DeadLocks: untangle it. Implement deadlocks, prevention, etc.
W11 Describe, using a suitable example, the relationship between logical and physical memory. (6 marks)
W11 What is the purpose of the: modified field, status field and the referenced field in the PMT of the demand page memory management system (6 marks)
W11 Trashing is a drawback of virtual memory. Explain using a suitable example what is meant by this concept. (4 marks)
W11 Explain how the least recently used swapping algorithm is implemented using for example the clock policy referencing technique (8 marks)
W11 Explain how a cache is used in virtual memory management and improves efficiency. (8 marks)