Software Designer (Operating System)

Source: Internet
Author: User

Syllabus requirements:

1. operating system kernel (interrupt control), process, thread

2. processor management (state conversion, sharing and mutex, time-sharing rotation, preemption, and deadlock );

3. Storage Management (primary storage protection, dynamic connection allocation, segmentation, paging, and virtual storage );

4. device management (I/O Control and false offline)

5. File Management (file directory, file organization, access method, access control, and recovery)

6. Job Management (Job Scheduling, Job control language (jcl), and multi-channel programming );

7. Chinese Character Processing, multimedia processing, and man-machine interface;

8 basic knowledge of network operating systems and embedded operating systems;

9 Operating System Configuration

Main test sites:

Test site 1: Process

Test site 2: Storage

Test site 3: Other small knowledge points

 

Test site 1: Process

1. Basic Concepts and status changes of processes

2. Process deadlock

3. process synchronization, semaphores, frontend graphs, and PV primitives

Three-state diagram

Ready: the process has obtained the required resources and can run only after CPU scheduling;

Running status: the process has obtained the resources required for running and the CPU is scheduled;

Waiting status: the status that does not meet the running conditions and the waiting time. In addition, the waiting status is also called the blocking status.

Five-state diagram

For example, select four correct statements from the following 8 statements:

1. Wake up: Pending-ready: can be called wake up, right

2. Blocking: Ready-"suspended: no blocking. This statement is incorrect.

3. Scheduling: Ready-run: Right

4. Timeout: Run-pending: Error

5 time-out: Run-"ready: Right

6. User processes can stimulate scheduling processes: users cannot change the process status, which is controlled by the operating system.

7. The user process can trigger the wake-up process: the user can change the process status.

8. User processes can trigger timeout processes: users cannot change the process status, which is controlled by the operating system.

 

Ready-run: the condition is selected by the scheduler.

Run-ready: the condition is that the time slice arrives (time-out) or is denied by a process with a higher priority.

Run-Wait: If the running condition is not met, wait for an event to occur.

Wait-ready, the condition is that the waiting event has occurred and the running conditions are met.

 

2. Process deadlock

Process management is the core of the operating system, but a deadlock may occur if it is improperly designed. If a process

Wait for an impossible event, and the process will be deadlocked. If one or more processes have deadlocks,

It will cause a system deadlock.

For example, if there are three processes A, B, and C. All three processes require five system resources. If the system has 13 Resources

It is impossible to have a deadlock.

Note: because the system can only execute one process at a time, there will be no deadlocks in the Process of 4, 4, and 5.

Conditions for deadlock:

Mutex condition: A resource can only be used by one process at a time. This is a real situation in the operating system.

Maintenance and waiting conditions: a process has obtained some resources, but when the request for other resources is blocked

The obtained resources are retained.

Non-deprivation condition: Some system resources are irretrievable. When a process has obtained such resources, the system cannot be strong.

The row is retained and can only be released when the process is used up.

Loop wait condition, several processes form a ring chain, each occupying the next resource requested by the other party.

The four conditions are mutually exclusive, holding and waiting. The conditions are not deprived and the loop waits.

Solution to deadlock

Deadlock Prevention, deadlock avoidance, Deadlock Detection, and deadlock removal.

Deadlock Prevention: 1. When a user applies for all resources (damage holding and waiting) 2. layer the resources and obtain the previous layer before applying for the next layer, which destroys the loop.

Deadlock Avoidance: determines whether these operations are safe when applying for resources. Banker algorithm

Deadlock Detection: the first two are in advance, while the Deadlock Detection is to determine whether the system is in a deadlock. If yes, the deadlock removal policy is executed.

Deadlock relief: used in combination with detection. It is a deprivation that forces the resource allocation to other processes.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.